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:

DSsmtp.unixhealthcheck.com

Change it to:

DS[smtp.unixhealthcheck.com]

Then save the configuration file, and refresh sendmail:

# refresh -s sendmail
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
SSH Essentials: Working with SSH Servers, Clients, and Keys
Viewed 4645 times since Wed, Jun 27, 2018
AIX Encrypted File System
Viewed 6111 times since Tue, Jul 17, 2018
Replacing a failed disk (rootvg)
Viewed 3196 times since Mon, May 21, 2018
0516-404 allocp: This system cannot fulfill the allocation request. [AIX]
Viewed 5508 times since Thu, Sep 20, 2018
NTLMSSP, SPN and AIX CIFS
Viewed 8369 times since Fri, Jun 15, 2018
Reconfigure RSCT ID to fix DLPAR issues on cloned AIX systems
Viewed 14388 times since Thu, Feb 21, 2019
Using Shell Redirection: All About the Here-Doc
Viewed 10564 times since Wed, May 30, 2018
Finding password rules in AIX
Viewed 2867 times since Mon, May 28, 2018
How to setup an user in AIX
Viewed 4217 times since Mon, May 28, 2018
Trick to Purge/Clean Swap Usage on AIX
Viewed 8422 times since Thu, Nov 29, 2018