LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   RHEL - Sendmail delay in Connecting to SMTP for some addresses only (https://www.linuxquestions.org/questions/linux-server-73/rhel-sendmail-delay-in-connecting-to-smtp-for-some-addresses-only-812191/)

dave_ice_berg 06-04-2010 02:03 PM

RHEL - Sendmail delay in Connecting to SMTP for some addresses only
 
Hello!

Sendmail on the RHEL server is set up to forward email to company internal mail server (via SMART_HOST). This has worked fine for years.

From the server, doing a sendmail dave@company.com, the message is sent immediately. No problems - and no change here.

From the server, doing a sendmail roberto@compania.com (compania is the part of the company in Mexico) causes a 2m40s delay before sendmail does anything. No packets are sent until after 2m40s wait. Message is always sent after the delay. It is not clear what the server is waiting for.

For *each* user in the @compania domain specified in sendmail command, an additional 2:40 is imposed before email is sent. Email is always sent after the n*2:40 sec delay.

Sending email to some_name@AnUnusedDomainNameThatDoesntExist.com is processed immediately - with a bounce email received in a couple of seconds.

Q: How do I determine where this 2m 40s delay is introduced?
Q: Any ideas what this could mean?

More data is available, of course - I'm just not sure what would be helpful so I won't clutter this up any further.

Thanks!!!
Dave

rweaver 06-04-2010 02:09 PM

In my experience the vast majority of times that kind of random latency is related to dns in sendmail. You can turn off lookups, verify your dns is resolving all sites correctly, or run a local caching name server to help the send times.

dave_ice_berg 06-04-2010 03:34 PM

Thanks for the reply, rweaver.

Is turning off the DNS lookups accomplished by changing /etc/nsswitch.conf
From: hosts: files dns
To: hosts: files

Can a domain name still be used for the SMART_HOST definition in sendmail.mc, or must that now be an IP address?

Thanks!

Robhogg 06-04-2010 03:44 PM

Quote:

Originally Posted by rweaver (Post 3992674)
In my experience the vast majority of times that kind of random latency is related to dns in sendmail.

Random, yes, I'd agree. However, this sounds more systematic.

If mails to paul@company.com are constantly processed quickly, those to pablo@compania.com show a significant lag, and ones to paolo@somerandomdomain.com are again processed quickly, I think it's likely to be something related but different.

Is sendmail trying to validate addresses inside the company against (e.g.) LDAP, and use DNS for external addresses? In that case the behaviour may make sense, with fast DNS, a fast LDAP connection for addresses@company.com, but a slower connection to an LDAP server at the mexican site, for addresses@compania.com


All times are GMT -5. The time now is 09:22 AM.