Configuring CyberPanel with Mailgun for SMTP Relay on Multiple Domains

86 Views Asked by At

I'm currently facing a challenge with setting up Mailgun as an SMTP relay for multiple domains on a single CyberPanel installation, and I'm hoping to get some insights or advice from the community.

Here's a rundown of my setup and the issue I'm encountering:

  • Configuration: I have CyberPanel installed on a DigitalOcean droplet, and I'm trying to configure Mailgun as an SMTP relay in Postfix. My Postfix configuration is as follows:

    relayhost = [smtp.eu.mailgun.org]:587 
    smtp_sasl_auth_enable = yes 
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd 
    smtp_sasl_security_options = noanonymous 
    smtp_use_tls = yes smtp_sender_dependent_authentication = yes

Domains: I'm running two domains, DomainA.de and DomainB.de

Issue: When sending emails from the DomainA.de to Gmail, everything works fine. However, sending from DomainB.de results in emails being received with an "On Behalf Of" DomainA.de label in the Gmail inbox. Further inspection revealed that emails from DomainB.de are getting a DKIM signature from DomainA.de

I've checked the email headers and found that the DKIM signature mismatch is likely the root cause of the "On Behalf Of" issue. I've verified the DNS settings for both domains, ensuring SPF and DKIM records are correctly set up. However, the problem persists, and I suspect it's a configuration issue within Postfix or CyberPanel.

Has anyone here faced a similar situation or have any insights on what I might be missing or doing wrong? Any suggestions on how to correctly configure Postfix for multiple domains with Mailgun as an SMTP relay would be greatly appreciated!

Thank you in advance for your help!

0

There are 0 best solutions below