Alerting when there is an excessive number of bounced emails

Bounced emails happen and that’s normal in a community, but sometimes there can be a deeper issue at play that can lead to outgoing emails bouncing on a large scale. It would be a good idea to have an admin dashboard/PM alert for this so that the issue doesn’t go unnoticed.


I have a community that’s apparently abandoned and I think the mailgun account is canceled or unpaid. It would be good if there was a way to notice it. It looks like discourse just stopped trying to send mail months ago.


+1 for this feature. For exact same reasons @pfaffman mentions. If managing many Discourse instances for customers, especially where the customer has their own SMTP service and may have forgotten to pay for it, it would be good if the instance didn’t stop emailing completely and ‘fail silently’.

1 Like

I also second this feature. It would be nice to know which emails are now dropped and why (soft bounce, hard bounce etc). Maybe a notification to the admin or something in the logs to check.

I’m trying to hard to figure out if email which bounce have been blocked by discourse or not?

For example if I see this in the logs

Email can not be processed: Email::Receiver::BouncedEmailError

How do I know if discourse will continue sending or no longer send emails to that address?

1 Like

There is an admin notification if e-mail is revoked, here is one from soundtransit notification e-mail sender which may have been automatic since they are only sending out mail not processing incoming mail:

Interesting. I don’t see any revoked email notifications. However in the logs and the email inbox I see many bounced emails. So the question is two fold:

  1. How do I know if discourse if properly parsing a bounced email response? I ask because the Bounced emails admin panel NO bounced emails but clearly there are bounced emails in the Received email section of the panel.
  2. When does discourse decided that bounced emails are nolonger valid emails it should stop emailing them?

Well that would depend on a few things, firstly if e-mail is:

#1 Simply being returned as undeliverable.


#2 The intended target of the mail has received the mail, but sent a reply requiring sending be stopped (as in demand a cease/desist of sending mail), that is different and might be what happened here with Sound Transit they might have an automatic system that does that or they may have manually requested un-subscription from notification e-mails which shouldn’t be sent to them anyway.