XF 1.4 Bounced email system + Mandrill (3rd party)

Moshe1010

Well-known member
I'm trying to configure Mandrill to support the bounced emails through the system. I send emails no problem with Mandrill, but it looks like users with a bounced email address aren't transferred into the "bounced" user group.

I can see through Mandrill's logs that they get an hard bounce, but nothing happens to their users. I also tested it by several incidents:

1. I tried to register with a fake email - got an hard bounce through Mandrill's logs - user is still in the "waiting for confirmation" user group. Shouldn't it move this user to the bounced user group? The notice bounced users see is different than those that are just waiting for an email, so if they stay in the waiting for confirmation user group, they don't really know what is the problem.

2. I tried to change to a fake email address to a current user and reset its password (with an add-on from Chris D). Still, same thing: hard bounce through Mandrill, but the user doesn't change its state.
Tried the same with sending a PC - same result.

Any ideas?
Just in case, the soft bounce settings (which aren't really related to the above) are:
Minimum number of bounces: 1
Minimum number of days with bounces: 1
Minimum number of days between oldest and newest bounce: 0

The bounce log is empty as well.

Thanks.

Edit: Now I get this error, not sure if related:
Server Error Log
Error Info
Zend_Mail_Protocol_Exception: last request failed - library/Zend/Mail/Protocol/Pop3.php:190


Stack Trace
#0 /home/admin/public_html/library/Zend/Mail/Protocol/Pop3.php(113): Zend_Mail_Protocol_Pop3->readResponse()
#1 /home/admin/public_html/library/Zend/Mail/Storage/Pop3.php(190): Zend_Mail_Protocol_Pop3->connect('smtp.mandrillap...', 587, 'TLS')
#2 /home/admin/public_html/library/XenForo/Model/EmailBounce.php(288): Zend_Mail_Storage_Pop3->__construct(Array)
#3 /home/admin/public_html/library/XenForo/Deferred/EmailBounce.php(19): XenForo_Model_EmailBounce->openBounceHandlerConnection()
#4 /home/admin/public_html/library/XenForo/Model/Deferred.php(256): XenForo_Deferred_EmailBounce->execute(Array, Array, 7.99999880791, '')
#5 /home/admin/public_html/library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.99999880791, '', false)
#6 /home/admin/public_html/library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#7 /home/admin/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#8 {main}

Request State
array(3) {
["url"] => string(34) "https://www.domain.com/deferred.php"
["_GET"] => array(0) {
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(15) "/threads/57680/"
["_xfNoRedirect"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}


Also tried to put my gmail/domain email and no luck.
 
Last edited:
  • Like
Reactions: rdn
Based on the host name, it looks like you're trying to connect to an SMTP server via POP3? The SMTP server you use to send email will be unrelated to the POP3/IMAP server that has the bounce address's account.

Also worth commenting that Mandrill may rewrite your email/return path. If that's the case, then the email wouldn't end up in the bounce account listed in XF, so there isn't any processing we can do.
 
Based on the host name, it looks like you're trying to connect to an SMTP server via POP3? The SMTP server you use to send email will be unrelated to the POP3/IMAP server that has the bounce address's account.

Also worth commenting that Mandrill may rewrite your email/return path. If that's the case, then the email wouldn't end up in the bounce account listed in XF, so there isn't any processing we can do.
I tried to use my domain's name email address and again, no bounced emails although there were some (that I created).
I tried to configure gmail as well for the bounced emails only (Mandrill is still sending all the emails), and again nothing.
Any ideas?

Just to make sure, the bounced email information are all outgoing (SMTP), right?
 
So Email Bounce management will not work on Mandrill?
If they're rewriting the return path, they're actually doing their own bounce management instead so XenForo won't get the bounces.

I tried to use my domain's name email address and again, no bounced emails although there were some (that I created).
I tried to configure gmail as well for the bounced emails only (Mandrill is still sending all the emails), and again nothing.
Any ideas?
I don't follow what you're saying exactly. If you're getting errors when connecting to the bounce email account (as shown in the first message), then that would preclude any processing that would be possible.

Also note that the bounce handler runs via a cron once an hour.
 
If they're rewriting the return path, they're actually doing their own bounce management instead so XenForo won't get the bounces.


I don't follow what you're saying exactly. If you're getting errors when connecting to the bounce email account (as shown in the first message), then that would preclude any processing that would be possible.

Also note that the bounce handler runs via a cron once an hour.
Just to make sure: for the bounced emails, do I need to configure an outgoing or incoming email server?
Can I set the cron to 0 minutes or "all" under minutes?
 
You need to configure an incoming (POP3/IMAP) server. It needs to collect mail sent to the bounce email address. If you're not getting bounces to that address, the bounce processor won't work.
 
I tried right now with a Gmail account and my server's email address. I don't get errors anymore, but users aren't getting to the bounced user group once their email is hard bounced nor the bounced logs showing anything (and yes, I run the cron manually). I guess I'm giving up.
 
Are there bounce messages in that account? (That would be seen via POP3/IMAP; Gmail has some POP3 specific options for example. Also note that with POP3, if an email is downloaded once, it won't be downloaded again.)
 
Are there bounce messages in that account? (That would be seen via POP3/IMAP; Gmail has some POP3 specific options for example. Also note that with POP3, if an email is downloaded once, it won't be downloaded again.)
Is there a problem setting up the cron to work every minute or even set it to "all" in the minutes section (is that even possible?). I would like new users to be transferred to the bounced group the moment the register and receive a confirmation email.
 
You can change it, though it will be reset on upgrade.

Note that the only time an account will change to the bounce state is when they're in the valid state already. Changing in another state could allow a registration process bypass (manual moderation).
 
You can change it, though it will be reset on upgrade.
So, I can set the cron to "all" and it will check bounced emails right a away/all the time? is there any performance issue here?

Changing in another state could allow a registration process bypass (manual moderation).
For example, if a user is in the waiting for email confirmation state, it wouldn't change this user to the bounced group if its email got an hard bounce?
 
So, I can set the cron to "all" and it will check bounced emails right a away/all the time? is there any performance issue here?
You'll be connecting to the mail server once per minute to look for new email, but that's it.

For example, if a user is in the waiting for email confirmation state, it wouldn't change this user to the bounced group if its email got an hard bounce?
No. The email confirmation states are not treated as valid emails as is -- the only emails sent would be ones explicitly requested (like when changing the email). The bounce state is for moving once valid users back.
 
Back
Top Bottom