TransWikia.com

Email does not reach external mail server (postfix)

Server Fault Asked on November 4, 2021

I have a mail server on mail.domainA.com which is working absolutely fine if I send email to [email protected]. I then configured a second domain (domainB.com) in bind9 (same server) to use mail.domainA.com as the mailing server. However, when I send email to [email protected] I see no logs in POSTFIX, so its like their is no contact with the mail server.

Note: I am using Cloudflare. So even if I expose mail.domainA.com my mailing server, still there is nothing in logs, somehow domainB.com is not contacting mail.domainA.com.

My bind9 configuration for DomainA:

; MX Record
domainA.com.         IN      MX      10      mail.domainA.com.
; A record for nameserver
@                       IN      A       1.1.1.1
mail                    IN      A       1.1.1.1
domainA.com.         IN      TXT     "v=spf1 a mx ip4:1.1.1.1 ~all"
mail                    IN      TXT     "v=spf1 a mx ip4:1.1.1.1 ~all"

My bind9 configuration for DomainB:

; MX Record
domainB.com.           IN      MX      10      mail.domainA.com.
; A record for nameserver
@                       IN      A       1.1.1.1
mail                    IN      A       1.1.1.1
mail                    IN      TXT     "v=spf1 mx a ip4:1.1.1.1 ~all"
domainB.com.           IN      TXT     "v=spf1 mx a ip4:1.1.1.1 ~all"

I also have the same setup on cloudflare.

My postfix (main.cf) config file:

myhostname = mail.domainA.com
mydomain = domainA.com
myorigin = domainA.com
virtual_alias_domains = domainA.com domainB.com

One Answer

There was no PTR record for domainB.com, as soon as I added the PTR record, i was able to see the connection in logs.

Also I had to expose the mail.domainA.com in Cloudflare.

Answered by nix on November 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP