XF 1.5 Amazon SES - dealing with bounced emails

brunoa

Member
I have a large forum with over 200k users and I'm using Amazon SES now to deal with emails, but they are strict about bounced emails and I'm risking having my account suspended. My question is simple: how to I deal with this problem? I know that XF has an automatic bounced email handler, but what does it do? Is it a solution?

Thanks for any help!
 
I would strongly advise you to clean your mailing list of bouncing addresses before sending via Amazon SES. We didn't do that, and we had to beg Amazon SES support to revoke our probation. Which, to their credit, they did.

The way you would do this would be:
  1. Setup the automated bounce handler in XF
  2. Make sure you are sending from a non-Amazon email server that
    1. is not blocked by any RBL
    2. can send infinite emails without throttling
    3. can send infinite emails without refusing to send any more
  3. Send an email to all users (who have not opted out of receiving site email, of course)
  4. Wait about a week to allow for receiving mail servers to bounce

If your web server is not blocked by any known RBL, great. If it is blocked, consider requesting a new IP address from your web host and explain to them that you would really prefer if it had a clean reputation with RBLs. Unblocking yourself from RBLs will not be feasible for this procedure, because you don't know how often companies like Google, Microsoft etc update their locally cached copies of the RBLs.

Once you have an IP address with a clean reputation, configure your forum to use your server's own mail server. If you have already configured your forum for Amazon SES, just use a second domain. For instance, if "dragonbyte-tech.com" is configured for SES, you would use "dragonbytetech.com" as your outgoing email server.

Use XF's diagnostics tool to make sure that your new SMTP configuration is working and sending email. If you receive the test email to your personal email account, great. You now have a method of sending email address to all your users (minus the ones who opted out of receiving site emails, of course), and the email you send out will not be automatically rejected by the receiving mail server.

Now it is time to send a newsletter, just as you would with Amazon SES. Your new configuration may not have great sender reputation, meaning that your email may end up in the spam folder of some users, but that's fine. We don't care about that. We only care that the receiving mail server (Google, Microsoft, Yahoo, AOL, etc) actually accepts your email.

Once it's been sent to all users, wait a week or two. Open the bounced email log in a new tab and check to make sure you're receiving bounced email and that XF is handling it correctly. If you are noticing that XF is not handling some of your bounced email correctly, you need to manually correct this. Manually find out which user the unknown bounced mail belongs to, and manually set their status to "Invalid (Email bounce)" - assuming this user state exists in XF1.

Watch over your bounced email log for about a week. Most mail will hard bounce within 72 hours, but I would wait about a week just to be safe. Once you have handled every single piece of bounced mail for a week, congrutalions! You now have a reasonably clean mailing list. The chance of your first Amazon SES powered newsletter running afoul of their "less than 10% of mail should bounce" soft rule is very small.

As for the future, I honestly couldn't say, as I've not ran XF 1.5. I do know that there is currently a bug in XF2's automated bounce handler due to a problem with the library they use to parse email. Whether this affects XF1 I couldn't say. Here's the thread for reference: https://xenforo.com/community/threads/email-bouncing-error.140419/

The way we @ DBTech worked around this is a small piece of custom code that gives me a button literally called "Fix bounced mail" that parses the bounce record in XF2 and finds the user, then executes the "hard bounce" action on that user. Only a mild inconvenience, but it means our mailing list is as close to squeaky clean as we can get it.


Fillip
 
Top Bottom