How to Configure Sendmail not to Look up MX records
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:
Change it to:
Then save the configuration file, and refresh sendmail:
# refresh -s sendmail