(Can we?) Redirect all unrouted incoming emails to a category

AI-generated summary

In a support discussion titled “(Can we?) Redirect all unrouted incoming emails to a category,” oca describes challenges managing incoming emails on their Discourse forum, including hidden email headers, moderate spam scores, and misconfigured category settings — leading to bounced emails and confused senders. They propose a failsafe: redirecting all non-spam, unrouted emails to a dedicated “uncategorized incoming emails for manual review” category, asking if it’s possible to set *@forum.mysite.org as a category email or achieve this via a plugin, ideally compatible with the Direct Delivery Incoming Email app. pfaffman suggests exploring IMAP support for group inboxes and notes that such a feature might require a complex plugin, though they’re unsure of the implementation difficulty. Globulle adds a related issue: emails sent via the CCI field (instead of TO/CC) trigger “BadDestinationAddress” bounces, asking if Discourse can be configured to accept such messages. The thread seeks technical solutions to improve email handling and reduce user confusion for non-user correspondents.

On a forum I manage, we have some trouble with incoming emails:

  • the townhall send us email hiding the To:, the Cc: and the other fields
  • some senders have a moderate spam score
  • our settings are changing quite fast, and sometime we miss a category setting in our setup

For those reason, some emails bounce back, and some non-user correspondent are surprised to get an automatic reply from Discourse (they though we were just a regular mailbox).

We would like to redirect all incoming email (that is not marked as obvious spam) and that could not find a proper category on a «uncategorized incoming emails for manual review» category. Some kind of failsafe, or of «else» clause. Is it possible to add *@forum.mysite.org as a category email ? Is it possible with a plugin ?

We are using the Configure direct-delivery incoming email for self-hosted sites with Mail-Receiver app, so a method using this tool would be perfect.

Thanks for your help !

Maybe check out IMAP support for group inboxes.

I think what you’re asking would take a somewhat complicated plugin (but I don’t know that code well, so it might be easier than I think).

Similar problem here: when a mail is sent to Discourse using CCI field (instead of TO or CC) and the sender receive a BadDestinationAddress email. Is it possible to make Discourse accept such a mail?