Sendmail is not accepting incoming connections

Found the following error in the logs and decided to write a note about it:

sendmail[]: rejecting connections on daemon MTA: load average:

The server always runs with a LoadAverage above 3, which is normal for a server under load, and there is still some headroom.

But exactly at midnight the backup starts and the load goes up sharply.

The RefuseLA limit in the sendmail configuration kicks in. Once that value is reached the mail is not accepted any more.

There is one more limit that would be good to use - QueueLA. It defines at which moment the mail starts going into the delivery queue (MailQueue).

If you noticed that your server does not deliver mail at certain moments, and the logs contain errors similar to the message at the beginning of the post, I recommend setting specific values for QueueLA and RefuseLA in the files:

  • /etc/mail/sendmail.cf
  • /etc/mail/submit.cf

The QueueLA and RefuseLA values have to be set based on the performance of your server. If you guess wrong - the mail will not be sent.

You need to monitor the server for a while to build a picture of the load it runs under, and only then change the settings.

More information can be found here