home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Previous Section Next Section


Limit life of a message in the queue Deprecated

When mail cannot be delivered promptly, it is left in the queue. At intervals specified by sendmail's -q command-line switch, or by a queue group's Interval= setting, periodic re-delivery of that queued mail is attempted. The maximum total time a mail message can remain in the queue before being bounced as undeliverable is defined by this QueueTimeout option. (Note that the QueueTimeout option has been deprecated in favor of the Timeout option of V8.7 sendmail.)

The forms of the QueueTimeout option are as follows:

O QueueTimeout=qtime                 configuration file (deprecated) 
-OQueueTimeout=qtime                 command line (deprecated) 
define(`confMESSAGE_TIMEOUT',`qtime')    mc configuration (deprecated) 
OTqtime                              configuration file (deprecated) 
-oTqtime                             command line (deprecated) 

The argument qtime is of type time. If this argument is missing or if the entire QueueTimeout option is missing, the value given to qtime is zero, and no mail is ever queued.[55] The qtime is generally specified as a number of daysó5d, for example. (Incidentally, RFC1123 recommends five days as a minimum.)

[55] That is, each message is instantly bounced if it cannot be delivered on the first try.

All queued mail is timed out on the basis of its creation time compared to the timeout period specified by the QueueTimeout option. Each queued message has its creation time stored in its qf file's T line (T line). When sendmail is run (either as a daemon or by hand) to process the queue, it gets its timeout period from the value of the QueueTimeout option. As the queue is processed, each message's creation time is checked to see whether it has timed out on the basis of the current value of the QueueTimeout option. Because the configuration file is read only once (when sendmail first starts), the timeout period cannot be subsequently changed. There are only two ways to lengthen the timeout period: first, by modifying the configuration file's QueueTimeout option, and killing and restarting sendmail; and second, by running sendmail by hand with the -q command-line switch (Section 11.8.1) and setting a new timeout using an appropriate command-line switch.

Although qf files should never be hand-edited, messages can theoretically be rejuvenated (made to appear young again) by modifying the creation time that is stored in a queued file's qf file. The details of the qf queue file are presented in Section 11.11.

Under V8 sendmail the sender can be notified when a message is delayed. This feature is enabled by the inclusion of a second argument following the qtime argument in the QueueTimeout option declaration:

O QueueTimeout=qtime/ notify                  configuration file (deprecated) 
-OQueueTimeout=qtime/ notify                  configuration file (deprecated) 
define(`confMESSAGE_TIMEOUT',`qtime/ notify') mc configuration (deprecated) 
OTqtime/ notify                               configuration file (deprecated) 
-oTqtime/ notify                              command line (deprecated) 

If the second argument is present, it must be separated from the first by a /. The notify specifies the amount of time sendmail should wait, after the message is first queued, before sending notification to the sender that it was delayed. If notify is missing or longer than qtime, no warning messages are sent. If notify is longer than qtime, no notification is ever sent.

Note that this is a crude method compared to the one described under the Timeout option in Timeout. Beginning with V8.7 sendmail and using the queuereturn and queuewarn keywords of that option, the qtime and notify values can be tuned on the basis of individual mail message priorities.

The QueueTimeout option is not safe. If specified from the command line, it can cause sendmail to relinquish its special privileges.

    Previous Section Next Section