Wednesday, March 15, 2006

unix tip: sendmail - email not been sent out but queued

ever come accross with this problem? when you try to sent out email, the email can't be sent out but get queued instead!!!
# cat filename | /usr/sbin/sendmail -v queued

somehow, sendmail by default will check the system load average
before sent out the email. if the load average exceeds QueueLA (default 8),
it stops delivering the mail, if load average exceeds RefuseLA (default 12)
it stops accepting the mail. both of the settings are located in

even you increased the value, sendmail still not works as its will give an error below.
# ps auxw | grep sendmail
root 6519 0.0 0.0 6252 2040 ? S 12:52 0:00 sendmail: rejecting connections on daemon MTA: load average: 77

so you need to set the value higher, but i'm not so sure about this.
this is my system load average: quite high huh!!!
# uptime
3:01pm up 96 days, 23:09, 15 users, load average: 78.10, 77.86, 77.57

of course you can manually flush/sent out the emails from the queue by using command below:
# /usr/sbin/sendmail -OQueueLA=80 -q 0 -v

but in this case i suggest you take a look at your system load & if possible try to decrease the load.

it took me a few days to find out this thing since there was no error message about the load average, but if you're lucky you'll get this "sendmail: rejecting connections on daemon MTA: load average:" in your log files which make easier to google :)

QueueLA default values is (8 * numproc) where numproc is the number of processors online (if that can be determined).

No comments: