On attempt to send an email to the domain
example.com it is bounced with the following message:
This is the mail system at host mail.yourdomain.com. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to postmaster. If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system <email@example.com>: Host or domain name not found. Name service error for name=example.com type=AAAA: Host found but no data record of requested type
yourdomain.com is sender's domain.
/usr/local/psa/var/log/maillog the following messages can be found:
Sep 12 07:35:43 mail postfix/smtpd: BFAF01B00085: client=yourdomain.com[192.168.0.1], sasl_method=LOGIN, firstname.lastname@example.org Sep 12 07:35:43 mail postfix/cleanup: BFAF01B00085: message-id=<20150911213543.Horde._QvV-QEOl66-QSoNrNmVsA1@webmail.yourdomain.com> Sep 12 07:35:43 mail postfix/qmgr: BFAF01B00085: from=<email@example.com>, size=805, nrcpt=1 (queue active) Sep 12 07:35:43 mail postfix/smtp: BFAF01B00085: to=<firstname.lastname@example.org>, relay=none, delay=0.07, delays=0.06/0/0/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=example.com type=AAAA: Host found but no data record of requested type) Sep 12 07:35:43 mail postfix/bounce: BFAF01B00085: sender non-delivery notification: D24591B0008F Sep 12 07:35:43 mail postfix/qmgr: BFAF01B00085: removed
Neither MX nor A record for the domain
example.com can be resolved from the mail server:
[root@mail]# dig mx example.com +short [root@mail]# dig a example.com +short
the command above show empty output. But when trying to query MX records for the domain using public DNS server they are resolved correctly:
[root@mail]# dig mx example.com @126.96.36.199 +short 10 smtp1.provider.tld. 20 smtp2.provider.tld.
Note: when MTA is trying to deliver an email, first it is looking for MX records. If MX records cannot be found, MTA is trying to resolve A record. If MTA cannot find A record too, the email is bounced and the error below is returned:
Name service error for name=example.com type=A: Host found but no data record of requested type
If IPv6 is enabled in Postfix
main.cf file, the error become as follows:
Name service error for name=example.com type=AAA: Host found but no data record of requested type
Specify correct DNS servers in the
/etc/resolv.conf on the mail server.