BSD Ports

sysutils/safecat 1.13p0 OpenBSD

copy stdin to a qmail-style maildir

System
OpenBSD
Repository
OpenBSD ports
Maintainer
Armin Wolfermann <[email protected]>
Categories
sysutils

Description

safecat is a program which implements D. J. Bernstein's maildir algorithm to copy stdin safely to a file in a specified directory. With safecat, the user is offered two assurances. First, if safecat returns a successful exit status, then all data is guaranteed to be saved in the destination directory. Second, if a file exists in the destination directory, placed there by safecat, then the file is guaranteed to be complete.

When saving data with safecat, the user specifies a destination directory, but not a file name. The file name is selected by safecat to ensure that no filename collisions occur, even if many safecat processes and other programs implementing the maildir algorithm are writing to the directory simultaneously. If particular filenames are desired, then the user should rename the file after safecat completes. In general, when spooling data with safecat, a single, separate process should handle naming, collecting, and deleting these files. Examples of such a process are daemons, cron jobs, and mail readers.

In the other systems

SystemPortVersion
OpenBSDsysutils/safecat1.13p0
FreeBSDsysutils/safecat1.13_1
NetBSDmail/safecat1.13nb1
DragonFlysysutils/safecat1.13_1

Install

Binary package:

pkg_add safecat

From the ports tree:

cd /usr/ports/sysutils/safecat && make install

Dependencies

No port depends on this one.