1

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
nix
  • 53
  • 3
  • 13
  • 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](https://meta.serverfault.com/q/963/126632)) – Michael Hampton Jul 20 '20 at 16:46

1 Answers1

0

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.

nix
  • 53
  • 3
  • 13