shouldqueue is called to decide if a message should be queued
or processed immediately.
Typically this compares the message priority to the current load average.
The default definition is:
If the current load average
CurrentLA, which is set before this function is called)
is less than the low threshold load average
(that is, it should
If the current load average exceeds the high threshold load average
Otherwise, it computes the function based on the message priority,
the queue factor
q, global variable
QueueFactor), and the current and threshold load averages.
if (CurrentLA < QueueLA)
return (pri > (QueueFactor / (CurrentLA - QueueLA + 1)));
An implementation wishing to take the actual age of the message into account
can also use the
which is the time that the message was first submitted to
sendmail. Note that the
pri parameter is already weighted
by the number of times the message has been tried
(although this tends to lower the priority of the message with time);
the expectation is that the
ctime would be used as an
escape clause to ensure that messages are eventually processed.
[Contents] [Previous] [Next]
Questions or problems regarding this web site should be directed to Steve Gielda.
Copyright © 1999 www.cotse.com. All rights reserved.
Last modified: Friday April 02, 1999.