# Seeking Advice on Mail Delivery Setup for Discourse Multisite

**URL:** <https://meta.discourse.org/t/seeking-advice-on-mail-delivery-setup-for-discourse-multisite/347227>\
**Category:** Self-hosting\
**Tags:** multisite\
**Created:** [January 15, 2025, 9:47am UTC](https://meta.discourse.org/t/seeking-advice-on-mail-delivery-setup-for-discourse-multisite/347227 "2025-01-15T09:47:25Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![onebigunicorn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/onebigunicorn/32/481011_2.png) [@onebigunicorn](https://meta.discourse.org/u/onebigunicorn)\
**Post date:** [January 15, 2025, 2:26pm UTC](https://meta.discourse.org/t/seeking-advice-on-mail-delivery-setup-for-discourse-multisite/347227/4 "2025-01-15T14:26:36Z")

</div>

Hi again,

Apologies for the confusion in my earlier post—I realize I didn’t describe the issue correctly. Let me clarify.

The challenge I’m facing is with email delivery in a multisite setup where the primary concern isn’t subdomains but entirely different main domains. For example, I’m trying to configure sites like `xyz1.domain1.com` and `xyz2.domain2.com` within the same Discourse container.

I understand that Discourse allows you to define a single notification email in `app.yml`, such as:

```plaintext
DISCOURSE_SMTP_ADDRESS: smtp.domain1.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: noreply@domain1.com
DISCOURSE_SMTP_PASSWORD: password
DISCOURSE_SMTP_ENABLE_START_TLS: true

```

his works perfectly for the first instance (`xyz1.domain1.com`). However, when emails are sent from the second instance (`xyz2.domain2.com`), email providers like Gmail flag them as mismatched because the email headers don’t align with the `xyz2.domain2.com` domain. Essentially, I can’t define separate SMTP configurations for each domain in a single multisite setup.

Has anyone successfully handled this scenario where each main domain in a multisite setup uses its own distinct SMTP credentials (e.g., separate `DISCOURSE_SMTP_*` settings per site)? Is there a workaround, or does this require separate containers for each domain to avoid mismatches?

Alternatively, are there any best practices or tools (e.g., Postfix tweaks, using List-Id headers) that could help resolve the mismatch issue without needing separate containers for each site?

I’d greatly appreciate any insights or suggestions. Thanks again for your time and support!

---

_[View the full topic](https://meta.discourse.org/t/seeking-advice-on-mail-delivery-setup-for-discourse-multisite/347227)._
