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
mail                    IN      A
domainA.com.         IN      TXT     "v=spf1 a mx ip4: ~all"
mail                    IN      TXT     "v=spf1 a mx ip4: ~all"

My bind9 configuration for DomainB:

; MX Record
domainB.com.           IN      MX      10      mail.domainA.com.
; A record for nameserver
@                       IN      A
mail                    IN      A
mail                    IN      TXT     "v=spf1 mx a ip4: ~all"
domainB.com.           IN      TXT     "v=spf1 mx a ip4: ~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
  • Did you configure Postfix to be authoritative for domainB.com? If not, that's your problem. – joeqwerty Jul 20 '20 at 16:06
  • umm I have add the main.cf config files, I am not sure i am no expert here – nix Jul 20 '20 at 16:09
  • Everything that you've posted obfuscated looks correct as far as it goes, so you probably will need to disclose the real domain names/IP addresses to get any further help. (Why we ask for real information) – Michael Hampton Jul 20 '20 at 16:46

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.