NAME
smapd - sendmail wrapper daemon
SYNOPSIS
smapd [invoked from rc.local]
DESCRIPTION
The smapd daemon periodically scans the mail spool area maintained by smap, and delivers any messages that have been gathered and stored. Mail is delivered via sendmail, and the spool file is deleted. If the mail cannot be delivered normally, smapd can be configured to store spooled files to an area for later examination.
OPTIONS
smap takes no command line options, reading its configuration information from the firewall toolkit configuration file netperm-table(5) All configuration rules in netperm-table for application "smapd" are read, and the following clauses and parameters are recognized:
- executable pathname
-
Specifies the pathname of the smapd executable itself. For historical reasons, smapd forks and execs copies of itself to handle delivering each individual message. THIS ENTRY IS MANDATORY
- sendmail pathname
-
Specifies an alternate pathname for the sendmail executable. Smapd assumes the use of sendmail but does not require it. An alternate mail delivery system can replace sendmail, but it should be able to accept arguments in the form of:
executable -f fromname recip1 [recip2 ... recipN]
Since the exit code from the mailer is used to determine the status of delivery, replacements for sendmail should use similar exit codes.
- baddir pathname
-
specifies a directory where smapd should move any spooled mail that cannot be delivered normally. This directory must be on the same device as the spool directory, since the rename(2) system call is employed. The pathname specified should not contain a trailing '/'.
- userid name
-
specify the userid that smapd should run under. The name can be either a name from the password database, or a numeric user-ID. This userid should be the same as that under which smap runs, and should have write permission to the spool directory.
- directory pathname
-
Specifies the spool directory in which smapd should search for files. smapd should have write permission to this directory.
- wakeup value
-
specifies the number of seconds smapd should sleep between scans of the spool directory. The default is 60 seconds.
INSTALLATION
To install smapd, configure the executable and directory options in netperm-table, and add it to /etc/rc.local
Sample netperm-table configuration for smap and smapd:
# email wrapper control smap, smapd: userid 4 smap, smapd: directory /mail/inspool smapd: executable /usr/local/etc/smapd smap: maxrecip 4000 smap: maxbytes 1048576 smap: timeout 3600
In this example, both smap and smapd are running with user-id #4 (uucp) in the spool directory /mail/inspool.
Since sendmail(8) is not running in daemon mode, messages that cannot be delivered and are queued must be delivered by periodically invoking sendmail to process its queue. Add a line like:
0,30 * * * * /usr/lib/sendmail -q > /dev/null 2>&1
to the crontab(5) file.
FILES
- spool directory