CentOS 5.x | SendMail 8.14.4
I'm trying to wrap my mind around how Connection Caching works in Sendmail.
I'm experiencing some connection issues with some remote mail hosts that we communicate with frequently and we're seeing errors like:
dsn=4.0.0 stat=Deferred: Connection timed out with <FQDN>
As part of the troubleshooting process, my firewall guy would like to know if my SendMail server is using a stateful connection only.
Initially, I thought it wasn't... but then I recalled the Connection Caching feature. I checked /etc/mail/sendmail.cf and confirmed that the following options are present:
O ConnectionCacheSize=2 O ConnectionCacheTimeout=5m
To me, that means that SendMail will keep up to 2 SMTP connections open (for 5 minutes each) in case more messages need to go there.
My question is: How does SendMail decide which connections are cached? Is this purely on a first send, first cached basis? Or is there a more complicated logic behind the caching mechanism?