zmailer1
Zmailer control script
Usage
zmailer [{kill | nuke}]
[router]
[scheduler]
[smtpserver]
[newaliases]
[resubmit]
[bootclean]
[cleanup]
[freeze]
[{thaw | unfreeze}]
Overview
zmailer is the quick interface to starting and stopping the local mail daemons. There are three daemons, called the router, the scheduler, and the smtpserver.
The router's home directory is POSTOFFICE/router, which it scans every 15 idle seconds for newly submitted message files. The router determines what to do with a message. It will typically send it on to the scheduler queue. This is maintained in the POSTOFFICE/scheduler directory, which is also the working directory of the scheduler and its transport agents. The scheduler process is what listens to the mailq TCP port for queries from the mailq program used to examine the state of the transport queues.
Options
Invoking zmailer without any argument is equivalent to giving the three arguments: router scheduler smtpserver. Invoking zmailer with only one argument, kill, is equivalent to invoking it with the four arguments: kill router scheduler smtpserver. The arguments specify actions to take in sequence:
freeze-
sets a flag so that latter options/executions of the zmailer script need at first an
unfreezeto allow restart of various subprograms. The goal is to keep automatically restarting systems from starting up a mailer when there is a maintance going on.
unfreeze-
clears the flag that
freezedid set. Has an alias:thaw.
kill-
sets a flag so that when the following arguments are executed, the relevant process will be shut down gracefully, as opposed to restarted. If
killis the last (or only) argument, it will terminate all three daemons.
nuke-
is like
killexcept the processes are shut down with the KILL signal.
router-
will start up (or shut down if after a
kill) a new router daemon.
scheduler-
will start up (or shut down if after a
kill) a new scheduler daemon.
smtpserver-
will start up (or shut down if after a
kill) a new SMTP server daemon.
newaliases-
will run the script to recreate the alias database from the MAILSHARE
/db/aliasesfile.
resubmit-
moves messages from the POSTOFFICE
/deferreddirectory to the POSTOFFICE/routerdirectory. This should be run regularly by cron.
bootclean-
does any necessary boot-time cleanup.
cleanup-
gets rid of old files from the POSTOFFICE
/postmanand POSTOFFICE/publicdirectories. This should be run once a day or week or month.
Examples
To stop the currently running daemons:
zmailer kill
At boot time, typically the following script fragment will be run to start up all the daemons:
. /etc/zmailer.conf if [ -f $MAILSHARE/zmailer ]; then $MAILSHARE/zmailer & (echo -n ' zmailer') >/dev/console fi
Files
/etc/zmailer.conf
/var/spool/postoffice (POSTOFFICE)
/local/lib/mail/router (MAILBIN/router)
/local/lib/mail/scheduler (MAILBIN/scheduler)
/local/lib/mail/smtpserver (MAILBIN/smtpserver)
/local/share/mail/newaliases (MAILSHARE/newaliases)
Releases
4 releases since Debian 2.0 (Hamm); the text changed 1 time.