'\" t .\" $Header: /home/mea/src/CVSROOT/zmailer/man/zmailer.1.in,v 1.9 2003/08/28 23:51:29 mea Exp $ .ds ]W ZMailer 2.99 .TH ZMAILER 1zm "2003-Aug-28" .SH NAME zmailer \- zmailer control script .SH SYNOPSIS .IP \fBzmailer\fR 8em [\fB\-\-zconfig\ \fI/mail/zmailer\-x.conf\fR] [[\fB\-q\fR] [\fBkill\fR|\fBnuke\fR|\fBstop\fR] [\fBstart\fR] [\fBrouter\fR] [\fBscheduler\fR] [\fBsmtpserver\fR] [\fBnewdb\fR] [\fBnewaliases\fR] [\fBresubmit\fR] [\fBbootclean\fR] [\fBcleanup\fR] [\fBlogsync\fR] [\fBfreeze\fR] [\fBthaw\fR|\fBunfreeze\fR]] .SH DESCRIPTION The .IR zmailer (1zm) is the quick interface to starting and stopping the local mail daemons, and doing other administrative chores. .PP There are three daemons, called the .IR router (8zm), the .IR scheduler (8zm), and the .IR smtpserver (8zm). .PP The .IR router (8zm)'s home directory is \fIPOSTOFFICE\fB/router\fR, which it scans every 15 idle seconds for newly submitted message files. The .IR router (8zm) determines what to do with a message. It will typically send it on to the .IR scheduler (8zm) queue. This is maintained in the \fIPOSTOFFICE\fB/scheduler\fR directory, which is also the working directory of the .IR scheduler (8zm) and its transport agents. The .IR scheduler (8zm) process is what listens to the .B mailq TCP port for queries from the .IR mailq (1zm) program used to examine the state of the transport queues. .PP .SH OPTIONS Invoking .IR zmailer (1zm) without any argument is equivalent to giving the three arguments: .RS 4em .B "router scheduler smtpserver" .RE .PP Invoking .IR zmailer (1zm) with only one argument, "\fBkill\fR", is equivalent to invoking it with the four arguments: .RS 4em .B "kill router scheduler smtpserver" .RE .PP The arguments specify actions to take in sequence: .IP "\fB\-\-zconfig \fI/path/to/zconfig\fR" accepted only as the .I first parameter, and can be used to override the hardcoded system-wide value of ZCONFIG ZENV variable. This value will also be propagated to all daemons started by this script. .IP \fB\-q\fR shuts up this script wrapper from muttering anything. .IP \fBfreeze\fR sets a flag so that latter options/executions of the .I zmailer script need at first an .B 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. .IP \fBunfreeze\fR clears the flag that .B freeze did set. Has an alias: .BR thaw . .IP \fBkill\fR sets a flag so that when the following arguments are executed, the relevant process will be shut down gracefully, as opposed to restarted. If .B kill is the last (or only) argument, it will terminate all three daemons. .IP \fBnuke\fR is like .B kill except the processes are shut down with the KILL signal. .IP \fBstart\fR clears the nuke/kill flag, and all daemons explicitely named after this (or if this the last in the command line, then all) will be started. .IP \fBrouter\fR will start up (or shut down if after a .BR kill ) a new .I router daemon. .IP \fBscheduler\fR will start up (or shut down if after a .BR kill ) a new .I scheduler daemon. .IP \fBsmtpserver\fR will start up (or shut down if after a .BR kill ) a new SMTP server daemon. .IP \fBnewdb\fR will run database regeneration per definitions at "\fIMAILSHARE\fB/db/dbases.conf\fR" file. See .IR zdbases.conf (5zm). .IP \fBnewaliases\fR will run the script to recreate the alias database from the "\fIMAILSHARE\fB/db/aliases\fR" file. (\fIThis is old invokation method, and is superceded with "newdb"\fR) .IP \fBresubmit\fR moves messages from the \fIPOSTOFFICE\fB/deferred\fR directory to the \fIPOSTOFFICE\fB/router\fR directory. This should be run regularly by cron. .IP \fBbootclean\fR does any necessary boot-time cleanup. .IP \fBcleanup\fR gets rid of old files from the \fIPOSTOFFICE\fB/postman\fR and \fIPOSTOFFICE\fB/public\fR directories. This should be run once a day or week or month. .IP \fBlogsync\fR A "post-logfile-movement" call hook to do things needed in various subsystems to get their logfiles reopened, or some such. Most subsystems have automated "reopen everything within 30 seconds of previous reopen" logic inside them. Some may have other requirements. .SH EXAMPLES To stop the currently running daemons: .PP .RS 4em .nf \fBzmailer kill\fR .fi .RE .PP At boot time, typically the following script fragment will be run to start up all the daemons: .PP .RS 4em .nf \fC. /opt/mail/zmailer.conf if [ -f $MAILSHARE/zmailer ]; then $MAILSHARE/zmailer -q & (echo -n ' zmailer') >/dev/console fi\fR .fi .PP .SH FILES .IP \fI/opt/mail/zmailer.conf\fR ZCONFIG file .IP \fI/var/spool/postoffice\fR $POSTOFFICE .IP \fI/opt/mail/bin/router\fR $MAILBIN/router .IP \fI/opt/mail/bin/scheduler\fR $MAILBIN/scheduler .IP \fI/opt/mail/bin/smtpserver\fR $MAILBIN/smtpserver .SH SEE ALSO .IR router (8zm), .IR scheduler (8zm), .IR smtpserver (8zm), .IR mailq (1zm), .IR newdb (8zm), .IR zdbases.conf (5zm), .IR zmailer.conf (5zm). .SH AUTHOR This program authored and copyright by: .RS 3em Rayan Zachariassen .RE Modifications over the years 1990-2003 by: .RS 3em Matti Aarnio .RE