Resource icon

[bd] Mails 1.1.0

No permission to download
Hey @xfrocks

been getting these errors for a long time now.. using Mandrill,
Code:
XenForo_Exception: [bd] Mails: Sending mail failed, log is available at /var/www/vhosts/wweforums.net/httpdocs/data/bdmails_1xxxxxxd5b9fccd02fe31b6aa1d65ce80.log - library/bdMails/Transport/Abstract.php:75
Generated By: Unknown Account, 8 minutes ago

Code:
#0 /var/www/vhosts/wweforums.net/httpdocs/library/bdMails/Transport/Abstract.php(61): bdMails_Transport_Abstract->_bdMails_log(Array, '[{"email":"skef...', false, Array)
#1 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Mail/Transport/Abstract.php(348): bdMails_Transport_Abstract->_sendMail()
#2 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#3 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/MailQueue.php(79): Zend_Mail->send(Object(bdMails_Transport_Mandrill))
#4 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.9856359958649)
#5 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_MailQueue->execute(Array, Array, 7.9856359958649, '')
#6 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9856359958649, '', false)
#7 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#8 /var/www/vhosts/wweforums.net/httpdocs/deferred.php(23): XenForo_Model_Deferred->run(false)
#9 {main}

This particular error was supposed to be an email for a reply to watched thread. Most of them are.
 
I have kept your add-on installed because I've had it installed for a long time and it works. But now that Xenforo includes similar functionality, I wanted to ask you or others: Does this one still have advantages? Thanks.
It is certainly easier to setup and quicker to react to bounces. XenForo does process bounce report in a cron job so the functionality is the same but it may be delayed, etc. Most provider also allow you to use smtp to send email though their service but for advanced features they still require api calls or custom smtp headers.

@xfrocks I really appreciate the update.

Most important question, which @jeffwidman mentioned here. Does this now remove an address from the Mandrill block list once it's marked as bounced in XF? If not, users get stuck in an endless loop after marking a message as spam.
As mentioned in the quoted post of @jeffwidman, removing address from provider list may reduce your sending reputation since those emails will be put in the circle again and they likely will bounce again. IIRC, most providers does not report hard bounce unless it is really a hard bounce (no upgrade from soft bounce etc.) and different email services have different policies regarding spam expiration so I think it's safe to ask user for a different email address once their existing one bounces. For extreme cases, admin can always perform the removal manually maybe?
 
Hey @xfrocks

been getting these errors for a long time now.. using Mandrill,
Code:
XenForo_Exception: [bd] Mails: Sending mail failed, log is available at /var/www/vhosts/wweforums.net/httpdocs/data/bdmails_1xxxxxxd5b9fccd02fe31b6aa1d65ce80.log - library/bdMails/Transport/Abstract.php:75
Generated By: Unknown Account, 8 minutes ago

Code:
#0 /var/www/vhosts/wweforums.net/httpdocs/library/bdMails/Transport/Abstract.php(61): bdMails_Transport_Abstract->_bdMails_log(Array, '[{"email":"skef...', false, Array)
#1 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Mail/Transport/Abstract.php(348): bdMails_Transport_Abstract->_sendMail()
#2 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#3 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/MailQueue.php(79): Zend_Mail->send(Object(bdMails_Transport_Mandrill))
#4 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.9856359958649)
#5 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_MailQueue->execute(Array, Array, 7.9856359958649, '')
#6 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9856359958649, '', false)
#7 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#8 /var/www/vhosts/wweforums.net/httpdocs/deferred.php(23): XenForo_Model_Deferred->run(false)
#9 {main}

This particular error was supposed to be an email for a reply to watched thread. Most of them are.
Have you checked the log report in the specified path?
 
Hey @xfrocks

been getting these errors for a long time now.. using Mandrill,
Code:
XenForo_Exception: [bd] Mails: Sending mail failed, log is available at /var/www/vhosts/wweforums.net/httpdocs/data/bdmails_1xxxxxxd5b9fccd02fe31b6aa1d65ce80.log - library/bdMails/Transport/Abstract.php:75
Generated By: Unknown Account, 8 minutes ago

Code:
#0 /var/www/vhosts/wweforums.net/httpdocs/library/bdMails/Transport/Abstract.php(61): bdMails_Transport_Abstract->_bdMails_log(Array, '[{"email":"skef...', false, Array)
#1 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Mail/Transport/Abstract.php(348): bdMails_Transport_Abstract->_sendMail()
#2 /var/www/vhosts/wweforums.net/httpdocs/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#3 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/MailQueue.php(79): Zend_Mail->send(Object(bdMails_Transport_Mandrill))
#4 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.9856359958649)
#5 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_MailQueue->execute(Array, Array, 7.9856359958649, '')
#6 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9856359958649, '', false)
#7 /var/www/vhosts/wweforums.net/httpdocs/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#8 /var/www/vhosts/wweforums.net/httpdocs/deferred.php(23): XenForo_Model_Deferred->run(false)
#9 {main}

This particular error was supposed to be an email for a reply to watched thread. Most of them are.

Those are simple "non-delivery" reports. They happen if Mandrill denies to send a message. Each time of it.
 
As mentioned in the quoted post of @jeffwidman, removing address from provider list may reduce your sending reputation since those emails will be put in the circle again and they likely will bounce again. IIRC, most providers does not report hard bounce unless it is really a hard bounce (no upgrade from soft bounce etc.) and different email services have different policies regarding spam expiration so I think it's safe to ask user for a different email address once their existing one bounces. For extreme cases, admin can always perform the removal manually maybe?

To be honest I'm not nearly as well versed in this stuff as @jeffwidman, so I'll defer to him.

We could definitely remove them manually, but that's assuming the person contacts us, which they might not.

My other question: Does this update resolve the 1,000 address limit now?

Thanks again for all your hard work on this :)
 
@xfrocks Just setting up this new version tonight.

Two questions:
1) For the Mandrill bounced webhook, do I need to manually configure it in my account settings?
Or do you POST a request to the Mandrill webhook API alerting them of the new endpoint in XF?

I assume the latter, but I just checked my account settings and don't see any webhook listed there... I would have expected it to show the new bounced webhook endpoints for my forums, but not seeing anything in there. Not sure if it just hasn't shown up yet, or hasn't been created by the bdmails addon yet, or if Mandrill just doesn't display webhooks created through the API in their GUI.

2) What events does your Mandrill webhook listen for in order to mark an email address as bouncing? I assume soft_bounce, hard_bounce, spam, unsubscribe... any others?

I'm unclear what will happen to the email addresses that are currently seen as fine by Xenforo, but marked as blacklisted by Mandrill... not sure what event Mandrill sends as a notification (I've filed a ticket with them for clarification), but want to be sure these get picked up as rejected/bounced by BDMails.

Also, a side note for @joelink and anyone else upgrading. Rather than upgrading, it's a bit cleaner to do a full uninstall through the ACP, delete the files in /library/bdmails and then reinstall fresh. Normally I don't worry about this when upgrading an addon, but the design was substantially changed, so if you only upgrade, there's a number of files from old version are left on the server but aren't used. I occasionally poke through addon code when debugging, so simpler for me if the code on the server doesn't include old cruft.
 
Last edited:
Or do you POST a request to the Mandrill webhook API alerting them of the new endpoint in XF?

I assume the latter, but I just checked my account settings and don't see any webhook listed there... I would have expected it to show the new bounced webhook endpoints for my forums, but not seeing anything in there. Not sure if it just hasn't shown up yet, or hasn't been created by the bdmails addon yet, or if Mandrill just doesn't display webhooks created through the API in their GUI.
With Mailgun I was asked on the Admin CP to click on a link that will automatically register the new webhook to Mailgun, wasn't there an option similar to that with Mandrill?
 
Cant get it works :(

is possible that someone help me to get it working with mailgun please?

Thanks in advance!
 
With Mailgun I was asked on the Admin CP to click on a link that will automatically register the new webhook to Mailgun, wasn't there an option similar to that with Mandrill?

Nope. I'm guessing it just uses the Mandrill api to automatically create the webhook (Mailgun may not support automatic webhook creation via API).

Here's the reply I got from Mandrill about what happens when sending two emails, where the first bounces and then the second gets rejected because it's been automatically put on the blacklist due to the bounce:
Hey Jeff,

Thanks for reaching out. In your scenario, there will be two webhooks that are triggered for the first email: one is for the bounce event (message event) and the other for a rejection blacklist entry (sync event). For the second email — or any time an email is sent while the address is still listed in the rejection blacklist — the email will be rejected and a reject event webhook (message event) will be triggered.

Also, to determine why an email in on the rejection blacklist, there is a rejection reason that you can find either by navigating to the Rejection Blacklist page or via the reject API calls — it can be either hard-bounce, soft-bounce, complaint, unsub, or custom (manually added).

I hope this helps. Let us know if you have any other questions.
 
Nope. I'm guessing it just uses the Mandrill api to automatically create the webhook (Mailgun may not support automatic webhook creation via API).
The link that I was asked to click appeared to refer to a certain file on my web root, most likely added by the add-on itself, and all I was asked to do was to click on it and it'd automatically reload the Admin CP settings page. I'd assume that file would actually call Mailgun API to add the webhook, because all I did was click on the link.
 
This new version needs "bdmails" in forum root directory and the usual "library > bdMails" one.

With that done and upgrading the xml, is there anything else needed to upgrade ?

New config or something or the upgrade will go smooth?

Thank you.
 
How does bounce processing work with Amazon SES?
I'd assume that Amazon SES will use webhook. Within bdmails folder, there are webhook files for Amazon SES, Mailgun, and Mandrill. FYI, I'm using Mailgun, and the add-on uses webhook to handle the bounce processing.
 
I've been getting about 5-6 of these per day for the last week or so:

Code:
Server Error Log
Error Info
XenForo_Exception: [bd] Mails: Sending mail failed, log is available at /home/asabet/public_html/mu-43.com/internal_data/bdmails_1447127711_3b055ba9d1d7fc92787184f09c4f8d89.log -library/bdMails/Transport/Abstract.php:47
Generated By: Unknown Account, Yesterday at 10:55 PM
Stack Trace
#0 /home/asabet/public_html/mu-43.com/library/bdMails/Transport/Abstract.php(35): bdMails_Transport_Abstract->_bdMails_log(Array, '[{"email":"chri...', false, Array)
#1 /home/asabet/public_html/mu-43.com/library/Zend/Mail/Transport/Abstract.php(348): bdMails_Transport_Abstract->_sendMail()
#2 /home/asabet/public_html/mu-43.com/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#3 /home/asabet/public_html/mu-43.com/library/XenForo/Model/MailQueue.php(79): Zend_Mail->send(Object(bdMails_Transport_Mandrill))
#4 /home/asabet/public_html/mu-43.com/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.99999690056)
#5 /home/asabet/public_html/mu-43.com/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_MailQueue->execute(Array, Array, 7.99999690056, '')
#6 /home/asabet/public_html/mu-43.com/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.99999690056, '', false)
#7 /home/asabet/public_html/mu-43.com/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#8 /home/asabet/public_html/mu-43.com/deferred.php(23): XenForo_Model_Deferred->run(false)
#9 {main}
Request State
array(3) {
["url"] => string(34) "https://www.mu-43.com/deferred.php"
["_GET"] => array(0) {
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(22) "/threads/36221/page-20"
["_xfNoRedirect"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}
 
been getting these errors for a long time now.. using Mandrill,

Those are not errors, but should be seen as information about a failed sent mail only. The details of the failed mail is in the file mentioned in that information.
 
Any reason why these would start to happen more often?

If you have just 1 user with a broken mailbox, who is getting a lot of notification mails, each of such mail will trigger this information. It is important to read the information file (or Mandrils reports) and make sure the email address gets removed from your system.
 
when i go to the bd mails option i just get this:
slpLWFv.png
 
@xfrocks, bug report ...

Code:
ErrorException: Undefined index: status - library/bdMails/Transport/AmazonSes.php:138
Generated By: Unknown Account, 9 minutes ago
Stack Trace
#0 library/bdMails/Transport/AmazonSes.php(138): XenForo_Application::handlePhpError(8, 'Undefined index...', '...', 138, Array)
#1 bdmails/amazon.php(5): bdMails_Transport_AmazonSes::doSns()
#2 {main}
Request State
array(3) {
  ["url"] => string(42) "https://<site>/bdmails/amazon.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

and

Code:
ErrorException: Undefined index: diagnosticCode - library/bdMails/Transport/AmazonSes.php:137
Generated By: Unknown Account, 10 minutes ago
Stack Trace
#0 library/bdMails/Transport/AmazonSes.php(137): XenForo_Application::handlePhpError(8, 'Undefined index...', '...', 137, Array)
#1 bdmails/amazon.php(5): bdMails_Transport_AmazonSes::doSns()
#2 {main}
Request State
array(3) {
  ["url"] => string(42) "https://<site>/bdmails/amazon.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Back
Top Bottom