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:
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!