Sendmail slow to accept emails
- by Rich
I have a PHP web app which is using SMTP to sendmail on localhost to send email.
I would like sendmail to accept the mail request immediately and queue it for later sending, as I don't want to have user-facing request threads blocked on emails.
Sendmail is installed with the default settings on RHEL web servers.
Sometimes sendmail is blocking for a long time after the MAIL command is sent -- sometimes taking 60 or 90 seconds to accept the mail. The time take is usually very close to 60 or 90 sec, which makes me think this is some kind of timeout.
I have looked in the sendmail logs, and there are plenty of "deferred" emails, but nothing which looks responsible for this delay.
How can I diagnose what is slowing down sendmail?
How can I configure sendmail to always accept the mail immediately and to queue the mail for later sending?
Update: I'm not sure, but it looks like this might be linked to aol.com addresses. I strongly suspect that sendmail is doing some kind of blocking receipient address verification at the accept-email-for-sending stage. How can I disable that, so that sendmail doesn't block my UI threads?
Update 2: This only seems to happen at busy times. Perhaps I am running out of sendmail threads or something? How can I check that?