SMM:08-16
Sendmail Installation and Operation Guide
· If the SuperSafe option is set to true, all mail messages are queued while delivery is attempted.
· If the DeliveryMode option is set to queue-only or defer, all mail is queued, and no immediate
delivery is attempted.
· If the load average becomes higher than the value of the QueueLA option and the QueueFactor
(q) option divided by the difference in the current load average and the QueueLA option plus
one is less than the priority of the message, messages are queued rather than immediately deliv-
ered.
· One or more addresses are marked as expensive and delivery is postponed until the next queue
run or one or more address are marked as held via mailer which uses the hold mailer flag.
· The mail message has been marked as quarantined via a mail filter or rulesets.
·
2.3.1. Queue Groups and Queue Directories
There are one or more mail queues. Each mail queue belongs to a queue group. There is
always a default queue group that is called ``mqueue'' (which is where messages go by default
unless otherwise specified). The directory or directories which comprise the default queue
group are specified by the QueueDirectory option. There are zero or more additional named
queue groups declared using the Q command in the configuration file.
By default, a queued message is placed in the queue group associated with the first recipi-
ent in the recipient list. A recipient address is mapped to a queue group as follows. First, if
there is a ruleset called ``queuegroup'', and if this ruleset maps the address to a queue group
name, then that queue group is chosen. That is, the argument for the ruleset is the recipient
address and the result should be $# followed by the name of a queue group. Otherwise, if the
mailer associated with the address specifies a queue group, then that queue group is chosen.
Otherwise, the default queue group is chosen.
A message with multiple recipients will be split if different queue groups are chosen by
the mapping of recipients to queue groups.
When a message is placed in a queue group, and the queue group has more than one
queue, a queue is selected randomly.
If a message with multiple recipients is placed into a queue group with the 'r' option
(maximum number of recipients per message) set to a positive value N, and if there are more
than N recipients in the message, then the message will be split into multiple messages, each of
which have at most N recipients.
Notice: if multiple queue groups are used, do not move queue files around, e.g., into a dif-
ferent queue directory. This may have weird effects and can cause mail not to be delivered.
Queue files and directories should be treated as opaque and should not be manipulated directly.
2.3.2. Queue Runs
sendmail has two different ways to process the queue(s). The first one is to start queue
runners after certain intervals (``normal'' queue runners), the second one is to keep queue runner
processes around (``persistent'' queue runners). How to select either of these types is discussed
in the appendix ``COMMAND LINE FLAGS''. Persistent queue runners have the advantage
that no new processes need to be spawned at certain intervals; they just sleep for a specified time
after they finished a queue run. Another advantage of persistent queue runners is that only one
process belonging to a workgroup (a workgroup is a set of queue groups) collects the data for a
queue run and then multiple queue runner may go ahead using that data. This can significantly
reduce the disk I/O necessary to read the queue files compared to starting multiple queue run-
ners directly. Their disadvantage is that a new queue run is only started after all queue runners
belonging to a group finished their tasks. In case one of the queue runners tries delivery to a
slow recipient site at the end of a queue run, the next queue run may be substantially delayed.
In general this should be smoothed out due to the distribution of those slow jobs, however, for