Friday, July 11, 2008

How To Configure Sendmail For Queueing Delay Time

Normally, when delivering mails to destination host by any mail transfer agent (MTA), MTA keeps track of delivery details such as delivery item location, delivery time stamps, particular mail IDs, and delivery attempt status. If a problem occurs when sending mails, normally an attempt should be made a later time and MTAs should queue up all bouncing mails on a particular time for a delivery retry.

With this scenario at hand, there are sendmail directives that can be configured to instruct sendmail not to complain to sender and bounce failing mail immediately. Sendmail can also be configured to queue mails  temporarily for a certain period of time while a delivery retry is being attempted.

Sendmail Tweak for Queueing Delay Time

Here are a few sendmail directives responsible for queueing on failed mails. Backup and modify your /etc/mail/sendmail.mc

Sendmail directive : confTO_QUEUEWARN

Defining sendmail directive confTO_QUEUEWARN tells sendmail not to complain and bounce mails immediately if it wasn't able to send mails to destination host for a particular period of time. This is most useful when computer hosts from your local network are sending mails using your server as their SMTP gateway while your sendmail SMTP server has no internet connection.

define(`confTO_QUEUEWARN', `4h')

The above sendmail directive instructs sendmail not to complain immediately for any delivery problems and queue mail temporarily to a maximum of 5 hours for later delivery. On most cases, sendmail sends a warning notice to sender informing him that there is problem delivering his previous emails and an attempt to deliver the mail would be made at a later time.

Sendmail directive :  confTO_QUEUERETURN

If all sendmail attempts to deliver a particular mail during the 'confTO_QUEUEWARN' period of time, this  directive instructs sendmail to bounce all emails with delivery problems to its sender and remove them from sendmail queues.

Naturally, all mails having delivery problems could not be kept or queued up into the sendmail server for all the time, they need to be either delivered successfully or bounced back to its sender for delivery failure status.

define(`confTO_QUEUERETURN', `6h')

The above sendmail directive instructs sendmail to bounce mails with delivery problems and deliver it back to its sender after 24 hours or 1 day delivery attempts.

Failed delivery attempts can be caused by a lot of reasons, one of them is internet connection or connectivity status. This could be your internet connection status, the host destination connection status, and the connection between the said two hosts.

If you configure sendmail to bounce back all failing mails immediately, you could get a lot of bounced back mails specially if you have intermittent internet connection or unpredictable ISP connection. Remember that instructing sendmail to bounce back failing mails does not mean less server load.

If you configure sendmail to bounce back email after a week, your sender could be notified on a very late period of time for a bouncing email. Too high value could also clogged down your email storage and could probably increase average server load.

For a full blown stand alone SMTP server, simply tweak your values with high consideration to your SMTP transaction rate, server storage mail capacity, server average load rate and resources.

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy