Setting up bounces handling
Discourse uses the VERP technique to handle bouncing e-mails.
To enable VERP, set the “
reply by email address” site setting with an email address template that uses the + sign. The default of
… works fine. If you are using your own or your company’s email server, then, that’s it
If, however, you are using a third party email service, you will need to enable VERP, or activate their webhooks as follows:
- Log in to MailGun and go to your dashboard; look in the right column for API Keys.
- in Discourse, set the
mailgun api keysite setting with your Secret API Key
- go to the MailGun domains list and click the one your discourse instance is using
- click on the webhooks tab and click the gear icon next to both
Hard bouncesevents; edit the URL of both webhooks to
- Log in to SendGrid and go to Mail Settings
- expand the Event Notification setting and enable it if it isn’t already
- click edit to set the HTTP POST URL to
- make sure you selected the following 3 actions:
- save your changes by clicking the
- Log in to MailJet and go to event tracking
- check the bounce event
- set the endpoint URL to
- check the in the group events column
- click the save button
- Login to SparkPost and go to your dashboard.
- Select Account from left menu icons
- Select Webhooks from menu ( SparkPost )
- Select New Webhook.
- Enter a friendly value for Webhook Name e.g.
- Enter a Target URL as
- Select Add Webhook.
Amazon Simple Email Service (AWS SES)
- 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
- Save Config
To ensure that everything is working, do this:
- Sign up for a new account on your site with an obviously incorrect email, of the form
- Wait a while for the emails to fully bounce (check your provider’s logs, if you want – they will usually be shown under the “warn” or “error” log level)
/admin/email/bouncedon your site to confirm that the bounce was picked up. Bear in mind this may take up to 48 hours depending on how many retries and the particular logic of your email provider.
Bounces handling can be customized using these site settings
- soft bounce score: points added to the user’s “bounce score” when we receive a temporary bounce from their email address
- hard bounce score: points added to the user’s “bounce score” when we receive a permanent (or unknown) bounce from their email address
- reset bounce score after days: number of days during which we must receive no bounce before we can reset the user’s “bounce score” back to 0
- bounce score threshold: score threshold at which point we will stop sending non urgent emails to the user
- bounce score threshold deactivate: score threshold at which point we will automatically deactivate the user