How to reduce the Sendmail DNS timeout period

Solution 1:

As a quick work-around you can fiddle with your /etc/resolv.conf. Of course this changes how the system resolver works, this is not at all sendmail-specific issue.

timeout: n
    sets the amount of time the resolver will wait for a response from a remote name server before retrying the query via a different name server. Measured in seconds, the default is RES_TIMEOUT (see <resolv.h> ). 
attempts: n
    sets the number of times the resolver will send a query to its name servers before giving up and returning an error to the calling application. The default is RES_DFLRETRY (see <resolv.h> ). 

In the long run, the above is not so good solution. Your DNS server setup is broken and it needs to be fixed. If there is a query about non-existing MX/domain the server should QUICKLY respond with NXDOMAIN. It should not wait such long time, as it generally causes all sorts of problems with many programs (sendmail for starters, but typically also sshd and NFS).