NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
FILES
SEE ALSO
AUTHOR

## NAME

zmailer - zmailer control script

## SYNOPSIS

zmailer [ kill | nuke ] [ router ] [ scheduler ] [ smtpserver ] [ newaliases ] [ resubmit ] [ bootclean ] [ cleanup ] [ freeze ] [ thaw|unfreeze ]

## DESCRIPTION

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 unfreeze to 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 kill |  | clears the flag that freeze did set. Has an alias: thaw. sets a flag so that when the following arguments are executed, the relevant process will be shut down gracefully, as opposed to restarted. If kill is the last (or only) argument, it will terminate all three daemons.
nuke router scheduler smtpserver newaliases resubmit |  | is like kill except the processes are shut down with the KILL signal. will start up (or shut down if after a kill) a new router daemon. will start up (or shut down if after a kill) a new scheduler daemon. will start up (or shut down if after a kill) a new SMTP server daemon. will run the script to recreate the alias database from the MAILSHARE/db/aliases file. moves messages from the POSTOFFICE/deferred directory to the POSTOFFICE/router directory. This should be run regularly by cron.
bootclean cleanup |  | does any necessary boot-time cleanup. gets rid of old files from the POSTOFFICE/postman and POSTOFFICE/public directories. 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) |

## SEE ALSO

router(8), scheduler(8), smtpserver(8), mailq(1), newaliases(1)

## AUTHOR

This program authored and copyright by:
Rayan Zachariassen <rayan@cs.toronto.edu>
Some extensions by:
Matti Aarnio <mea@nic.funet.fi>