XF 2.1 Mail issues: Server errors - what does this mean?

djbaxter

in memoriam 1947-2022
Sometimes, but not always, when one of the forums I manage sends out the weekly digest, the server errors log shows this for most members (note that these are valid active members and the email addresses are correct, at least for the ones I checked)

Code:
Server error log

    ErrorException: Email to {member@emailprovider.com} failed: [E_WARNING] fwrite(): SSL: Broken pipe src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:240

    Generated by: Unknown account Apr 11, 2019 at 8:21 AM

Stack trace

#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] fwr...', '/home/certif64/...', 240, Array)
#1 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(240): fwrite(Resource id #253, 'MAIL FROM:<foru...')
#2 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php(173): Swift_Transport_StreamBuffer->_commit('MAIL FROM:<foru...')
#3 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php(92): Swift_ByteStream_AbstractFilterableInputStream->_doWrite('MAIL FROM:<foru...')
#4 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(276): Swift_ByteStream_AbstractFilterableInputStream->write('MAIL FROM:<foru...')
#5 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(270): Swift_Transport_AbstractSmtpTransport->executeCommand('MAIL FROM:<foru...', Array, Array)
#6 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(346): Swift_Transport_EsmtpTransport->executeCommand('MAIL FROM:<foru...', Array)
#7 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(416): Swift_Transport_EsmtpTransport->_doMailFromCommand('forum+6d988b3c+...')
#8 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(444): Swift_Transport_AbstractSmtpTransport->_doMailTransaction(Object(Swift_Message), 'forum+6d988b3c+...', Array, Array)
#9 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(176): Swift_Transport_AbstractSmtpTransport->_sendTo(Object(Swift_Message), 'forum+6d988b3c+...', Array, Array)
#10 src/XF/Mail/Mailer.php(292): Swift_Transport_AbstractSmtpTransport->send(Object(Swift_Message), Array)
#11 src/XF/Mail/Queue.php(138): XF\Mail\Mailer->send(Object(Swift_Message), Object(Swift_SmtpTransport), Array)
#12 src/XF/Job/MailQueue.php(12): XF\Mail\Queue->run(G)
#13 src/XF/Job/Manager.php(253): XF\Job\MailQueue->run(G)
#14 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#15 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#16 job.php(42): XF\Job\Manager->runQueue(false, 8)
#17 {main}

Request state

array(4) {
  ["url"] => string(14) "/forum/job.php"
  ["referrer"] => string(38) "https://www.holisticactions.com/forum/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

What is causing this and how can it be fixed?
 
Check your email servers logs for the failed email address, that should provide you with the cause. Possibly your Mail server is being rejected in an RBL for Spam like behaviour or similar. Without more details of your MTA and logs of the same it is going to be a needle in a haystack to find your solution.
 
Check your email servers logs for the failed email address, that should provide you with the cause. Possibly your Mail server is being rejected in an RBL for Spam like behaviour or similar. Without more details of your MTA and logs of the same it is going to be a needle in a haystack to find your solution.
No indications of this in any of the server logs.
 
Wow that was almost 2 years ago.

I'm not having that issue any more and haven't for some time.

I don't use any third party mailing systems for Xenforo forums and I think the original problem was probably fixed by switching to the default PHP mail option (I already have chown correctly set to the account name and all the email checks applied on the server like DKIM, SPF, Reverse DNS (PTR), all of which can be set in cPanel under Email Deliverability; there's a 4th one too that I always forget the name/initial of).
 
Back
Top Bottom