A default sendmail configuration will do DNS queries for MX records. It does this even when its setup to use a Mail Relay Server for sending mail out. This will cause mail to fail if its not able to lookup the MX record, for example when the SMTP relay server is not known in DNS.
Setting up sendmail not to query DNS for MX records when using a DS (Smart Relay) consists of using "[ ]" brackets around the hostname (or IP address) Mail Relay Server configured in the /etc/mail/sendmail.cf.
To do so, edit the sendmail configuration file:
# vi /etc/mail/sendmail.cf
Search for the DS entry. For example:
DSsmtp.unixhealthcheck.com
Change it to:
DS[smtp.unixhealthcheck.com]
Then save the configuration file, and refresh sendmail:
# refresh -s sendmail
Article Number: 563
Posted: Fri, Apr 19, 2019 2:28 PM
Last Updated: Fri, Apr 19, 2019 2:28 PM
Online URL: http://kb.ictbanking.net/article.php?id=563