Introduction
This document describes a basic overview of how delivery works on the ESA. There are many variables involved so it is difficult to say what is causing specific messages to be delayed without investigating each individually.
Queues
The message's recipients are divided up by destination domain queue. The system scans the destination domain queues on an ongoing basis; the more destinations in memory, the longer each pass of scans will take. If the system is under heavy load, this can delay the delivery queue scans.
Connections
Each delivery connection will send up to 50 messages before closing. If connections are already established, the system will attempt to send over the open connections. If those connections become full or a particular connection is taking a long time, the system will try to establish new connections. The number of open delivery connections is limited by the Destination Controls and Delivery Max Concurrency settings.
Network
Messages that are larger will take longer to deliver than smaller messages. If the network connection is slow for any reason, mail delivery will be slowed too. If there are network errors reaching a particular IP for a destination domain, the messages will be re-queued for another connection. If there are DNS errors looking up a destination domain or all hosts are unreachable, all mail for that domain will be re-queued until the issue is resolved. A particular MID may have multiple DCIDs associated with it, with each DCID having to transmit the full DATA content over the network.
Logs
When scanning is complete, the message is "queued for delivery":
Thu Nov 8 18:26:45 2007 Info: MID 6 queued for delivery
The logs reflect the MID & DCID association when the MAIL SMTP command is sent:
Thu Nov 8 18:26:46 2007 Info: Delivery start DCID 3 MID 6 to RID [0]
The "Message done" line is logged when the DATA portion of the SMTP connection is completed for the recipients related to that DCID:
Thu Nov 8 18:26:46 2007 Info: Message done DCID 3 MID 6 to RID [0]
The message is not removed from the delivery queue until all recipients are delivered on all domains:
Thu Nov 8 18:26:46 2007 Info: Message finished MID 6 done