Dec 20, 2010

How to make sendmail use hosts file as well as the DNS for name resolutions ?

Subject: Configure Sendmail for name resolutions using hosts file and DNS server.

To make the Sendmail look for the hosts file as well as the DNS for name resolutions:

1) create a service.switch file in /etc/mail folder.
   
2) vi the service.switch file and add the below entry

    hosts    file    dns

    This will query the hosts file before querying the DNS server.


3) execute the below command

    # kill -HUP `head -1 /var/run/sendmail.pid`

    This will bring the changes into effect