Hello, I have received an email bounce with the following message:
delivery temporarily suspended: Host or domain
name not found. Name service error for name=domain.com type=MX: Host not
found, try again
However, when I ran the command dig mx domain.com
on the host, I successfully obtained the MX records:
; <<>> DiG 9.16.1-Ubuntu <<>> mx domain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1797
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;domain.com. IN MX
;; ANSWER SECTION:
domain.com. 3600 IN MX 5 ALT2.ASPMX.L.GOOGLE.COM.
domain.com. 3600 IN MX 1 ASPMX.L.GOOGLE.COM.
domain.com. 3600 IN MX 10 ALT4.ASPMX.L.GOOGLE.COM.
domain.com. 3600 IN MX 5 ALT1.ASPMX.L.GOOGLE.COM.
domain.com. 3600 IN MX 10 ALT3.ASPMX.L.GOOGLE.COM.
;; Query time: 243 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Tue May 09 18:08:48 CEST 2023
;; MSG SIZE rcvd: 159
But, when I ran it inside Docker with the command docker compose exec postfix-mailcow dig mx domain.com
seems like it was unbale to obtained the MX records
; <<>> DiG 9.16.37-Debian <<>> mx domain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 46968
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;domain.com,. IN MX
;; Query time: 219 msec
;; SERVER: 127.0.0.11#53(127.0.0.11)
;; WHEN: Tue May 09 16:08:38 UTC 2023
;; MSG SIZE rcvd: 41
Has anyone ever experienced the same issue as me? If so, how to overcome it?