# Multiple Mail Receivers for Multiple Discourse Instances

**URL:** https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764
**Category:** Feature
**Created:** [March 23, 2022, 1:52pm UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764 "2022-03-23T13:52:24Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Walker\_Blackwell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/walker_blackwell/32/119568_2.png) [@Walker\_Blackwell](https://meta.discourse.org/u/Walker_Blackwell)
#### Post date: [March 23, 2022, 1:52pm UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/1 "2022-03-23T13:52:24Z")

</div>

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,  
-Walker

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 4, 2022, 6:13am UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/2 "2022-04-04T06:13:32Z")

</div>

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

@martin is there documentation somewhere we can link to?

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [April 4, 2022, 6:45am UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/3 "2022-04-04T06:45:49Z")

</div>

We have this [Set up reply by email with POP3 polling](https://meta.discourse.org/t/set-up-reply-via-email-support/14003) and also [SMTP support for group inboxes](https://meta.discourse.org/t/smtp-support-for-group-inboxes/195572) 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 · GitHub](https://github.com/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 ?

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [April 4, 2022, 6:51am UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/4 "2022-04-04T06:51:46Z")

</div>

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

E.g.

`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.

---

<div class="post-metadata">

### Author: ![Walker\_Blackwell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/walker_blackwell/32/119568_2.png) [@Walker\_Blackwell](https://meta.discourse.org/u/Walker_Blackwell)
#### Post date: [April 15, 2022, 2:59pm UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/5 "2022-04-15T14:59:17Z")

</div>

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.

-Walker

---

<div class="post-metadata">

### Author: ![Walker\_Blackwell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/walker_blackwell/32/119568_2.png) [@Walker\_Blackwell](https://meta.discourse.org/u/Walker_Blackwell)
#### Post date: [November 9, 2022, 10:07pm UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/6 "2022-11-09T22:07:15Z")

</div>

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) . . .

warmest  
-Walker

---

<div class="post-metadata">

### Author: ![Walker\_Blackwell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/walker_blackwell/32/119568_2.png) [@Walker\_Blackwell](https://meta.discourse.org/u/Walker_Blackwell)
#### Post date: [May 4, 2023, 1:54pm UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/7 "2023-05-04T13:54:15Z")

</div>

ding\*

This a thing that is worth-it?

-Walker

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [May 6, 2023, 10:21am UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/8 "2023-05-06T10:21:43Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Walker\_Blackwell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/walker_blackwell/32/119568_2.png) [@Walker\_Blackwell](https://meta.discourse.org/u/Walker_Blackwell)
#### Post date: [May 6, 2023, 2:39pm UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/9 "2023-05-06T14:39:22Z")

</div>

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 . . .

regards  
-Walker

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [May 6, 2023, 10:51pm UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/10 "2023-05-06T22:51:43Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [January 3, 2025, 10:12am UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/11 "2025-01-03T10:12:12Z")

</div>

I’ve now got a working configuration on my dedicated server which is providing these capabilities.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [January 3, 2025, 10:21am UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/12 "2025-01-03T10:21:13Z")

</div>

Do you like to tell how you did it.

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [January 3, 2025, 10:25am UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/13 "2025-01-03T10:25:08Z")

</div>

I would like to, soon, when I have the time ⏲ - I’m just in a time crunch at the moment!

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [January 3, 2025, 10:26am UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/14 "2025-01-03T10:26:22Z")

</div>

Time is just a concept 🤣 But thanks, that would be nice.

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [January 25, 2025, 4:28pm UTC](https://meta.discourse.org/t/multiple-mail-receivers-for-multiple-discourse-instances/221764/15 "2025-01-25T16:28:27Z")

</div>

I provide one method here…

> [@Configure direct-delivery incoming email for self-hosted sites with Mail-Receiver](https://meta.discourse.org/t/configure-direct-delivery-incoming-email-for-self-hosted-sites-with-mail-receiver/49487/529):
>
> On my dedicated server (running Ubuntu 22.04, with Postfix installed) I use a separate mail-receiver.yml paired to each instance of Discourse where I have enabled the mail-in posting feature. This setup creates a separate container for each instance of Discourse on my server (alongside the typical app container) which receives and processes the e-mails for its corresponding Discourse instance. Incoming emails for all of the Discourse forums on the server are received by Postfix through the sta…
