Handling bouncing e-mails


(Dean Taylor) #21

Leave them at their default values


(Anton) #22

Re SendGrid, should now we also check the “Mark as Spam” checkbox?

Here is the full list:


(Pugwash) #23

I am using Amazon SES to send out our mails for Discourse. What would be the best way to handle bounces for SES?

Amazon allow you to set up a web hook via SNS (Simple Notification System) which we are already using on our primary web application. Can Discourse read these hooks natively, or is there a way we can call Discourse from our web application over the API to instruct Discourse not to send to a given user’s email address?


(Anton) #24

I think we just have to ask for a native support of Amazon SES bouncing notifications, the same we did for SparkPost.


(David Taylor) #25

I have SES bounce handling working fine using the VERP support which discourse and SES have. You need to turn on “email feedback forwarding” to get SES to send VERP messages.

I can’t find a massive amount of documentation about AWS’s SES VERP support, but here’s an announcement: AWS Developer Forums: Amazon SES Now Supports VERP

You’ll need to have this set up:

So… many… acronyms!!


(Christoph) #26

Really? The default value is that all events are selected:

Doesn’t this mean that my discourse will be bombarded with information it doesn’t need?


(Dean Taylor) #27

When giving instructions I try to keep it as simple as possible - hence leaving all options at defaults is easy and works…

…However yes this does mean that events that Discourse is not interested in are sent to it and promptly ignored.

Any impact is relative to the amount of mail sent by your instance, but note these “events” are grouped so there isn’t usually a unique request to Discourse for each event - so the impact is smaller than you might think.


Display more info about greylisted emails (under bounced)
#28

Hi,

This is a fantastic feature, thanks for implementing this.

Want to ask if Discourse handles receiving webhook events for emails being marked as spam and/or unsubscribing (not via normal discourse unsub link). As these should be handled differently to bounces.

E.g. Lots of SMTP providers have their own unsub links and gmail also have their own unsub button too (which will send the info back to the mailserver via feedback loop).

Edit: Also, I noticed that, using the default bounce settings, seems that users can’t pass a bounce score of 2, at least within some unknown time frame (I just added webhooks for bounces today). This has happened to several different users, one of which for example has received 12 bounces today, but still has a bounce score of 2.


(Christoph) #29

What if I use a different mail provider than the ones listed here? Can discourse receive webhooks from any provider or only the ones listed in the OP?


(Régis Hanol) #30

Only the ones that are supported.


(Christoph) #31

ElasticEmail is recommended but not supported?


(Christoph) #32

I noticed that ElasticEmail has a setting that allows you to have bouncing emails forwarded to an address of your choice. Is this how discourse can learn about them? Can in interpret them?


(David Taylor) #33

If ElasticEmail supports the VERP standard, then discourse should be able to interpret bounces correctly. This is how I handle Amazon SES bounce detection

So the question is whether their “forwarding” of bounced emails conforms to the spec…


(Alexey Lustin) #34

Wthat about Mandrill ?

in master i see this config discourse/webhooks_controller.rb at master · discourse/discourse · GitHub for Mandrill

but it not working with our instance

  • currently after we create WebHook - Discource redirect Mandrill from https://our-discource/webhooks/mandrill to https://our-discource/login

we have a Discource with disable anonymous access


(Stephen Chung) #35

Does the bounce email webhook work without the reply key?

I use Sendgrid to send but my incoming pop3 is a different server which doesn’t support the + suffix.

So I was forced to turn off reply keys and use just a standard reply to address. Threads are sorted via the In Reply To header.

I understand that using Sendgrid with the webhook requires reply keys to work?


(Michael Howell) #36

It works for me with combining the return-path webhook (using Mailgun to send email from my main domain) and a reply-to handler with no + sign (using the local SMTP server to receive email on the forum subdomain).


(ljpp) #37

Sorry for not getting it.

So I enable this and somehow configure SES to forward bounces to an accound, and make Discourse POP poll the account for bounces?

Would someone kindly document the SES process, step by step.


(David Taylor) #38

Make sure you have this bit done:

Your discourse instance must be able to receive email sent to this address. This should work via POP, but I highly recommend Straightforward direct-delivery incoming mail

Then for AWS I followed these steps:

  • Log in to the AWS console, and go to Simple Email Service (SES)
  • Under Domains, find the one you use for your forum, and click it
  • Under the Notifications section, click “Edit Configuration”
  • All of the SNS settings can be set to “No SNS Topic”
  • Under “Email Feedback Forwarding”, choose Enabled

I will add those steps to the #howto above :slight_smile:


As an aside, make sure you are aware of this issue when using SES with Discourse:


(Philip Colmer) #39

One little tip that caught us out (we’re using SES to send but Google Mail to receive) - make sure that the received emails are not being treated as spam. If they are, Discourse doesn’t see them.

I had to add a filter to the GMail mailbox to ensure that emails from MAILER-DAEMON@amazonses.com are never treated as spam.


(Colin Marshall) #40

@tophee did you manage to get this working with Elastic Email? If so, I would appreciate it if you could describe the steps you took so it could be added to the first post in this topic. Thanks!