Email does not reach external mail server (postfix)

I have a mail server on mail.domainA.com which is working absolutely fine if I send email to name@domainA.com. 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 someone@domainB.com 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

Go to Source
Author: nix