DELIVER(8)

NAME
deliver - MMDF mail delivery process

SYNOPSIS
deliver [-bdpsw] [-cchan,chan] [-lmins] [-thrs] [-ohrs] [-mmaxsort] [-Llogfile] [-Tsecs] [-Vloglevel] [message1 ... messageN]

DESCRIPTION
The deliver program handles the management of all mail delivery under the MMDF mail system. Deliver does not deliver mail directly, but instead calls on MMDF channels to handle actual delivery. Deliver's actions are guided by the MMDF tailoring file, /usr/mmdf/mmdftailor, and by the command line options. The program can run as either a daemon or a user-invoked program. The program may be called to process the entire mail queue or just handle some explicitly named messages. When possible, deliver will attempt to process messages in the order received. Deliver also maintains a cache of host information on a per-channel basis which allows hosts which are unavailable for delivery to be skipped until available.

Deliver first builds a list of channels to process, either from the command line or composed of all the non-passive channels in the system. Next, a list of messages to process is collected, either from the command line or by scanning the mail queue for for each channel. If the the number of messages in the queue for a given channel is more than maxsort (set in tailor file or on command line), the queue directory for that channel will be processed in the order read, without sorting by submission time. If a list of messages is given on the command line, no sorting will take place and the messages will be delivered in the order specified. The sorting keys are (in order): channel, submission time, and finally host. This causes many accesses to the messages but minimizes the invocation of channel programs.

Deliver is setuid to the superuser to allow it to set its real and effective UID and GID to that of the MMDF user.

The following options may be used to alter deliver's behavior:

-b  Background mode. Causes deliver to run as a background daemon making periodic sweeps over the mail queues looking for undelivered mail and attempting deliver. The invoker must be the MMDF user or the superuser to use this option. Deliver attempts delivery for all eligible messages, then sleeps, and then repeats the process. The default sleep time is 10 minutes but it can be changed (see the -T option below).

-cchannel1,channel2,...
    Channel selection. A comma-separated list of channels to be processed.

-d  Already in ``quedfldir''. This option will cause deliver to assume it is already in the mail queue and therefore it will not issue an explicit chdir(). This is useful if you wish to have deliver operate on an alternate mail queue hierarchy, mainly for testing.

-lminutes
    Sets the ``time-to-live'' for entries in the dead-host cache. This time defaults to 2 hours. The dead host cache is used to prevent attempts to deliver to hosts that are known to be down. The ``time-to-live'' is given in minutes. If the number of minutes is negative, dead host caching is disabled.

-mmaxsort
    Sets the sort threshold. If there are more than maxsort messages in a given channel's queue, then they are processed in directory order without first sorting by submission time. If -m is not specified, the value of maxsort is given in the tailor file by MMAXSORT or in conf.c.

-ohrs
    This option tells deliver to attempt to deliver only those messages which have been in the queue over hrs hours. For efficiency reasons, this option only applies when the queue is being sorted. If an explicit list of messages was given on the command line, if the -s option is in effect, or there are more messages than the maxsort threshold (see the -m option), then this option does not apply. This option is useful for delivering messages stuck on one channel over an alternate channel. The two channels must share the same queue. This option and the -t option are mutually exclusive.

-p  Pickup only mode. Indicates that the invoker would like to pickup a passive mail channel.

-s  Force linear search of the mail queue. Normally deliver will deliver messages in the order they were received which seldom matches the order in the directory. This option is useful if the queue gets so large that deliver can no longer deal with sorting the queue in a reasonable time.

-thrs
    Time limiting. This option tells deliver to attempt to deliver only those messages which have been in the queue for less than hrs hours. For efficiency reasons, this option only applies when the queue is being sorted. If an explicit list of messages was given on the command line, if the -s option is in effect, or there are more messages than the maxsort threshold (see the -m option), then time limiting does not occur. This option is useful for high-throughput channels to multiple destinations where some of the destinations are very reliable and others are less so. This option allows you to process the new messages promptly and ignore the old ones that have already failed and are likely to keep failing for some time. This option and the -o option are mutually exclusive.

-w  Watch the delivery. Causes deliver to print informative messages on the standard output as it is attempting delivery. This option is passed onto the channel programs which also give informative messages.

-Llogfile
    Sets the logfile for this deliver to the file specified. The default is to log into the file msg.log in the MMDF log directory. This option is only available to the Superuser and MMDF.

-Tseconds
    Sets the sleep time between background sweeps of the mail queue. This defaults to 10 minutes.

-Vloglevel
    Sets the logging level for this deliver to the level specified. The loglevel should be a valid mmdf logging level string such as FTR. This option is only available to the Superuser and MMDF.

SEE ALSO
submit(8), channels(7), queue(5), "Installing and Operating MMDF II"