How to stop sendmail from taking down the system

There are two important settings in the sendmail.mc file:

confQUEUE_LA            QueueLA         [varies] Load average at which
                                         queue-only function kicks in.
                                         Default values is (8 * numproc)
                                         where numproc is the number of
                                         processors online (if that can be
                                         determined).
confREFUSE_LA           RefuseLA        [varies] Load average at which
                                         incoming SMTP connections are
                                         refused.  Default values is (12 *
                                         numproc) where numproc is the
                                         number of processors online (if
                                         that can be determined).

On a dedicated mail server, you want to set QueueLA higher than RefuseLA - the other way around will cause your queue to explode when the load is high (assuming you reach QueueLA of course), you accept lots of new messages but can't get rid of them as the load average hovers around RefuseLA - the many messages in the queue drive up disk I/O and thereby the load average.

The default of QueueLA lower than RefuseLA only makes sense for a server that does other things besides mail, where you want to reduce the impact of the mail load on the other functions by queuing instead of delivering when the load is high.

Your original sendmail.mc file may state:

dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl

I normally change it to for a web server, that uses sendmail for formmail scripts etc:

dnl define(`confQUEUE_LA', `3')dnl
dnl define(`confREFUSE_LA', `6')dnl

You will need to remake the config files before restarting the server so the changes take effect, to do this run the following command:

make -C /etc/mail

With Redhat make sure you have the "sendmail-cf" packaged installed to do this.

Last updated: 16/04/2005