Resource icon

[bd] Mails 1.1.0

No permission to download
A few tips to users who are trying to get Amazon SES to work with this. I initially installed this plugin assuming that the problems I was having sending with Amazon SES had to do with SMTP sending but I was wrong.

A few tips:

1. When you create an IAM user for Amazon SES email, it will give you SMTP credentials. You can use that for SMTP sending and don't need this plugin (unless you want to do the bounce mail processing through the plugin).

2. If you do want to use this with IAM keys, then generate a new IAM pair using the same permissions as the IAM user you generated from SES. Others may be smarter than I but it was the only way I could get an Access Key and Secret Key pair that had SES sending permissions. Until I did this I was getting "SignatureDoesNotMatch" errors.

3. This is most important of all (and perhaps it was documented but I couldn't find it). When you create your Amazon SES account and you're ready to go, you have to request an increase to the sending limit in Amazon SES. I had to search the internet to figure this out. If you're receving this error from Amazon:

Email address is not verified. The following identities failed the check in region...

And the email it tells you that is not verified is the TO address then the problem is that you're in sandbox mode. Once you get your limit increased by sending a request to Amazon then you'll be able to send using either the IAM key method (this plugin) or using SMTP.
 
Last edited:
A few tips to users who are trying to get Amazon SES to work with this. I initially installed this plugin assuming that the problems I was having sending with Amazon SES had to do with SMTP sending but I was wrong.

A few tips:

1. When you create an IAM user for Amazon SES email, it will give you SMTP credentials. You can use that for SMTP sending and don't need this plugin (unless you want to do the bounce mail processing through the plugin).

2. If you do want to use this with IAM keys, then generate a new IAM pair using the same permissions as the IAM user you generated from SES. Others may be smarter than I but it was the only way I could get an Access Key and Secret Key pair that had SES sending permissions. Until I did this I was getting "SignatureDoesNotMatch" errors.

3. This is most important of all (and perhaps it was documented but I couldn't find it). When you create your Amazon SES account and you're ready to go, you have to request an increase to the sending limit in Amazon SES. I had to search the internet to figure this out. If you're receving this error from Amazon:



And the email it tells you that is not verified is the TO address then the problem is that you're in sandbox mode. Once you get your limit increased by sending a request to Amazon then you'll be able to send using either the IAM key method (this plugin) or using SMTP.
All of your points are correct. Regarding #3, that step is fairly prominent if you follow SES tutorial. We may need to have better documentation though. Thank you.
 
Yikes. After hours of dealing with the "SignatureDoesNotMatch" error and ready to give up, I stumbled across the AWS/IAM user "create access key" button. I thought surely the keys they generated for me automatically would work but might give it a try anyway. Sure enough, created new keys and it worked.

Now I understand the "generate a new IAM pair using the same permissions as the IAM user you generated from SES" above but that just didn't register with me initially. Crazy that the keys AWS automatically generate didn't work.
 
Hi,

I'm using Mandrill. Sometimes I get the following error:

Email to xxxxxxxx@gmail.com failed: Read timed out after 10 seconds - library/Zend/Http/Client/Adapter/Socket.php:514

#0 /library/Zend/Http/Client/Adapter/Socket.php(330): Zend_Http_Client_Adapter_Socket->_checkSocketReadTimeout()
#1 /library/Zend/Http/Client.php(989): Zend_Http_Client_Adapter_Socket->read()
#2 /library/bdMails/Transport/Mandrill.php(118): Zend_Http_Client->request('POST')
#3 /library/bdMails/Transport/Abstract.php(31): bdMails_Transport_Mandrill->_bdMails_sendMail()
#4 /library/Zend/Mail/Transport/Abstract.php(348): bdMails_Transport_Abstract->_sendMail()
#5 /library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#6 /library/XenForo/Model/MailQueue.php(79): Zend_Mail->send(Object(bdMails_Transport_Mandrill))
#7 /library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.9999988079071)
#8 /library/XenForo/Model/Deferred.php(295): XenForo_Deferred_MailQueue->execute(Array, Array, 7.9999988079071, '')
#9 /library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9999988079071, '', false)
#10 /library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, 8, '', false)
#11 /deferred.php(23): XenForo_Model_Deferred->run(false)
#12 {main}

Any idea?

Thanks,
jb-net
 
I've been playing with this a few days and cannot get the amazon ses bounce/complaints working via the api. I have SNS set up correctly and subscribed to send me emails as well as hitting the API via http. I get the emails but nothing shows up in the xenforo email bounce log. What am I missing? Any other settings required such as subscription delivery policy or raw message delivery? Include message headers?

Of course I could just move to the email-based bounce processing but then there isn't much point of using BD-mails.

I've read every post and seen other people with similar issues but didn't find a solution anywhere. Anyone have this working that lend a hand?

C.
 
Last edited:
How does one set up the SNS auto bounce handler? I can't enter a link with https:// in http endpoint, and if I enter https:// it's not getting confirmed. Can someone help me out understanding how to do this?
 
How does one set up the SNS auto bounce handler? I can't enter a link with https:// in http endpoint, and if I enter https:// it's not getting confirmed. Can someone help me out understanding how to do this?
Https works fine for me, have you verified your domain under SES?

screenshot-console.aws.amazon.com-2017-03-26-07-12-42.webp
 
I've been playing with this a few days and cannot get the amazon ses bounce/complaints working via the api. I have SNS set up correctly and subscribed to send me emails as well as hitting the API via http. I get the emails but nothing shows up in the xenforo email bounce log. What am I missing? Any other settings required such as subscription delivery policy or raw message delivery? Include message headers?

Of course I could just move to the email-based bounce processing but then there isn't much point of using BD-mails.

I've read every post and seen other people with similar issues but didn't find a solution anywhere. Anyone have this working that lend a hand?

C.
Have you got a dedicated bounced email address and is it verified on SES?
 
I do but I'm not using the bounced email to process them. Instead I'm hoping to use the notifications to the API.
 
I'm using this with MailGun and all of our mails are coming from xenforo@domain instead of the specified e-mail when we use the mass mailer... is there a setting I missed somewhere?
 
Any way to actually validate if this addon is processing the bounces correctly?

Code:
72.21.217.173 - - [25/May/2017:17:37:27 +0000] "POST /bdmails/amazon.php HTTP/1.1" 200 31 "-" "Amazon Simple Notification Service Agent" "72.21.217.173" rt=0.004 ua="127.0.0.1:9003" us="200" ut="0.004" ul="22" cs=-
72.21.217.138 - - [25/May/2017:17:35:04 +0000] "POST /bdmails/amazon.php HTTP/1.1" 200 31 "-" "Amazon Simple Notification Service Agent" "72.21.217.138" rt=0.000 ua="127.0.0.1:9003" us="200" ut="0.000" ul="22" cs=-
72.21.217.155 - - [25/May/2017:17:38:02 +0000] "POST /bdmails/amazon.php HTTP/1.1" 200 31 "-" "Amazon Simple Notification Service Agent" "72.21.217.155" rt=0.000 ua="127.0.0.1:9003" us="200" ut="0.000" ul="22" cs=-
72.21.217.76 - - [25/May/2017:17:34:05 +0000] "POST /bdmails/amazon.php HTTP/1.1" 200 31 "-" "Amazon Simple Notification Service Agent" "72.21.217.76" rt=0.000 ua="127.0.0.1:9003" us="200" ut="0.000" ul="22" cs=-
72.21.217.178 - - [25/May/2017:17:35:03 +0000] "POST /bdmails/amazon.php HTTP/1.1" 200 31 "-" "Amazon Simple Notification Service Agent" "72.21.217.178" rt=0.000 ua="127.0.0.1:9003" us="200" ut="0.000" ul="22" cs=-
But we don't see anything in the bounced mail log for these.
 
Hi
i can't make Bounced Email Processing works with mailgun ?

is it still working?
thank you
You should make custom PHP script to pull bounced report from mailgun, and update the user's state using manual SQL query.
It's not really convenient, but it works :)

I'm using this with MailGun and all of our mails are coming from xenforo@domain instead of the specified e-mail when we use the mass mailer... is there a setting I missed somewhere?
I had the same question :D
The author answered me in his own forum. You can check.
I am not sure if i'm allowed to post the link here. Maybe i shouldn't :)
 
BTW this has issues with cloudflare + mailgun

here is a small snipit from the log area from mailgun.

Code:
06/29/17 03:57 PM    Will retry in 1800 seconds: postmaster@portalcentric.net → http://portalcentric.net/forums/bdmails/mailgun.php <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]--> <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]--> <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]--> <head> <title>Attention Required! | Cloudflare</title> <meta charset="UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" /> <meta name="robots" content="noindex, nofollow" /> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" /> <link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" /> <!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]--> <style type="text/css">body{margin:0;padding:0}</style> <!--[if lte IE 9]><script type="text/javascript" src="/cdn-cgi/scripts/jquery.min.js"></script><![endif]--> <!--[if gte IE 10]><!--><script type="text/javascript" src="/cdn-cgi/scripts/zepto.min.js"></script><!--<![endif]--> <script type="text/javascript" src="/cdn-cgi/scripts/cf.common.js"></script> </head> <body> <div id="cf-wrapper"> <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div> <div id="cf-error-details" class="cf-error-details-wrapper"> <div class="cf-wrapper cf-header cf-error-overview"> <h1 data-translate="challenge_headline">One more step</h1> <h2 class="cf-subheadline"><span data-translate="complete_sec_check">Please complete the security check to access</span> portalcentric.net</h2>

you need the following rules here on cloudflare to be set so it doesn't do any checks when bdmails is doing its thing:

Screen Shot 2017-06-30 at 6.47.59 am.webp

also make sure that Tracking Settings is all off in mailgun dashboard & there is no email.yourdomainame in your DNS settings pointing to mailgun as confirmation emails would not work at all, page wouldn't even load. if setup via cloudflare i have full SSL setup with HSTS enabled

Screen Shot 2017-06-30 at 6.52.16 am.webp
 
BTW this has issues with cloudflare + mailgun

here is a small snipit from the log area from mailgun.

Code:
06/29/17 03:57 PM    Will retry in 1800 seconds: postmaster@portalcentric.net → http://portalcentric.net/forums/bdmails/mailgun.php <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]--> <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]--> <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]--> <head> <title>Attention Required! | Cloudflare</title> <meta charset="UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" /> <meta name="robots" content="noindex, nofollow" /> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" /> <link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" /> <!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]--> <style type="text/css">body{margin:0;padding:0}</style> <!--[if lte IE 9]><script type="text/javascript" src="/cdn-cgi/scripts/jquery.min.js"></script><![endif]--> <!--[if gte IE 10]><!--><script type="text/javascript" src="/cdn-cgi/scripts/zepto.min.js"></script><!--<![endif]--> <script type="text/javascript" src="/cdn-cgi/scripts/cf.common.js"></script> </head> <body> <div id="cf-wrapper"> <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div> <div id="cf-error-details" class="cf-error-details-wrapper"> <div class="cf-wrapper cf-header cf-error-overview"> <h1 data-translate="challenge_headline">One more step</h1> <h2 class="cf-subheadline"><span data-translate="complete_sec_check">Please complete the security check to access</span> portalcentric.net</h2>

you need the following rules here on cloudflare to be set so it doesn't do any checks when bdmails is doing its thing:

View attachment 153983

also make sure that Tracking Settings is all off in mailgun dashboard & there is no email.yourdomainame in your DNS settings pointing to mailgun as confirmation emails would not work at all, page wouldn't even load. if setup via cloudflare i have full SSL setup with HSTS enabled

View attachment 153984
Looks like CloudFlare blocked Mailgun notification requests? Thanks for bringing it to our attention.
 
Top Bottom