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.
I guess they’re talking about discourse deployment as multisite and support for incoming emails per site.
discourse1.example.com & discourse2.example.com 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.
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.