Multiple Mail Receivers for Multiple Discourse Instances

Dear Discourse devs, Discourse has enabled multiple domains and multiple discourse instances for many years but there is no way to direct incoming emails to multiple mail-receivers/domains in all of those years. Can we make this happen? Reply-by-email does not work without costly polling for multi-site discourse.

best regards,


Not following exactly, we do support multiple incoming mailboxes now.

@martin is there documentation somewhere we can link to?

We have this Set up Reply via Email Support ✉ and also SMTP support for group inboxes but I’m not sure if either of those solve the OP’s problem. I think OP is talking about accepting incoming emails via GitHub - discourse/mail-receiver and directing them to multiple sites? Maybe I am misreading though, can you provide more details of what you want to achieve @Walker_Blackwell ?


I guess they’re talking about discourse deployment as multisite and support for incoming emails per site.

E.g. & are hosted as a multisite and OP wants to receive incoming emails for both domains using mail-receiver container instead of relying on any external mailbox.


Exactly. The mail-receiver is only supportive of one domain/site however everything else is multi-domain/site.

It would be ideal to support multi-site multi-receiver.


sorry, got busy.

Yes, this is what I’d like. Using the email_receiver has a ton of advantages and keeps polling down etc.

The rest of the code is multi-site out of the box. It would be nice to see this be part of email receiver. I get it might be a weird bit of coding (port-wise) . . .



This a thing that is worth-it?


It’s doable, but it’ll need a fair chunk of coding. The main thing that would need to be ironed out is how to specify the mapping between email addresses (and domains) and multisite instances, along with the API username/key to use for each site.

If this is important enough to you, dropping something in marketplace is probably the best way to get it moving, unless someone at CDCK suddenly has an itch they decide to scratch.

Mainly asking if I was alone here or not . . . I guess I use discourse as a public customer support intake/help-ticket system for multiple domains and that is maybe more of a special case scenario . . . even if things were going to a single intake domain (port 25 whatever) but the receiver was able to parse the @ emails to go to different discourse instances (api end-points) . . . then there would be no working of the lower level code . . . dunno. I guess it’s like you said @mpalmer , lots of code . . .


I wouldn’t say “alone”, but it’s certainly a niche use-case that perhaps 0.01% or so of people who self-host Discourse run up against. There wouldn’t be any need to modify Discourse itself, it’s a matter of modifying the mail-receiver to, as you say, parse out the domain of the incoming e-mails and route them to the correct Discourse instance, using the appropriate API user and key for each request.