هل يمكن لمستلم البريد الواحد معالجة رسائل البريد الإلكتروني لجميع المواقع في إعداد Discourse Multi-site؟

We are currently running Discourse with a multisite setup, and we plan to use the Mail Receiver for email handling. I have a question about the configuration:

Is it possible to configure a single Mail Receiver container to handle incoming emails for all forums in the multisite setup?

I want to ensure that the incoming emails are correctly routed to the appropriate forum based on their domain. Has anyone configured Mail Receiver in a similar setup?

Any guidance, examples, or best practices would be greatly appreciated!

3 إعجابات

It might be sufficient to adapt this function for multisite:

Thanks for sharing this , but what about the API key how will the mail receiver handle this ?

إعجاب واحد (1)

A hacky way would be to use the same API key on every instance.

إعجابَين (2)

Sounds crazy but I can give it a try!

إعجاب واحد (1)

I just did something similar which is working

4 إعجابات

Thank you so much @denvergeeks for sharing this with me but I have some questions:-

  1. Have you installed Postfix on your server first?
  2. According to your docs I will need to create a mail receiver container for each forum right?
  3. You map the domain to its corresponding forum using the transport map.
  4. I see that you have made some changes to the volume mounts too.
إعجابَين (2)

Yes, all correct.

إعجابَين (2)

Thanks for the confirmation, but can you explain why did you add additional volume because I see both are even different from the default one

إعجابَين (2)

It is because of this section… to make available the functionality for blocking certain domains.

إعجاب واحد (1)

Greate, one last question .

Should I create a new path for each mail receiver for example I have about 10 forums so I will need to create new volume for each one od them like this

Default forum:

- volumes:
      host: /var/discourse/shared/mail-receiver/postfix-spool
      guest: /var/spool/postfix

First forum:

- volumes:
      host: /var/discourse/shared/mail-receiver-1/postfix-spool
      guest: /var/spool/postfix

Second forum:

- volumes:
      host: /var/discourse/shared/mail-receiver2/postfix-spool
      guest: /var/spool/postfix

إعجابَين (2)

Yes that is correct :+1:

إعجابَين (2)

Really appreciated, I will start the implementation and keep you updated

إعجابَين (2)

Hi @denvergeeks

Thanks to your support, I’ve gained a much clearer understanding of how to proceed. I admire the way you generously share your knowledge, and I’m grateful to be part of such a collaborative community it’s working now.

I do have a quick follow-up question: Is there any additional configuration or best practices you’d recommend for enhancing security in this setup?

Thanks again for your support—it means a lot to me!

Looking forward to hearing from you.

6 إعجابات

Not that I know of but, I agree with you, that is the next question for which I hope we’ll get some guidance from the community!

Great work! I really appreciate your postings about your progress and results as well - it is a really nice validation and reward for my efforts in sharing!

4 إعجابات

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.