XF 1.5 Mail delivery issues

SpecialK

Well-known member
Running 1.5.21

This problem just started today, so far as I can tell.

We have postfix configured to relay mail through Amazon SES
We have XF configured to use the 'Default' email transport method
Randomly, XF will just fail to send emails. The logs say the following (many many times over many different ISPs)
Code:
Zend_Mail_Transport_Exception: Email to user@gmail.com failed: Unable to send mail. mail(): Could not execute mail delivery program '/usr/sbin/sendmail -t -i ' - library/Zend/Mail/Transport/Sendmail.php:137
Generated By: Unknown Account, A moment ago
Stack Trace
#0 /home/site/public/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 /home/site/public/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 /home/site/public/library/XenForo/Model/MailQueue.php(79): Zend_Mail->send(Object(Zend_Mail_Transport_Sendmail))
#3 /home/site/public/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.9999990463257)
#4 /home/site/public/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_MailQueue->execute(Array, Array, 7.9999990463257, '')
#5 /home/site/public/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9999990463257, '', false)
#6 /home/site/public/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, 8, '', false)
#7 /home/site/public/deferred.php(23): XenForo_Model_Deferred->run(false)
#8 {main}

What is especially odd is that I KNOW PHP can still send mails, through Postfix (And then through SES) because during the time that XF is failing to send emails, I can execute a one line PHP script in a loop and send hundreds of emails successfully with no error logs. I have verified through the mail headers that the email is indeed going out from postfix and then through SES.

During the time that XF is refusing to send mail, NOTHING is showing up in the mail server logs. It's like XF isn't even trying to send the mail / something is preventing it from doing so. And then randomly, without me having done anything, it will begin to send again.

I see nothing in any server logs regarding blocking access to sendmail and I'm at a complete loss as to where else to look. I run lots of decently sized XF forums and I've never encountered this problem before.

Any thoughts on where else to look?


Edit: Found the problem. For some reason, when XF is sending out a batch of emails through the default mailer, it's triggering the linux OOM handler which is killing the process, which is why the process can't hit sendmail. Now to figure out why...
 
Last edited:
Back
Top Bottom