Saturday, May 20, 2006

MX records not being served by ADSL router

We were not getting our automated mails from Jo'burg playout server after going on the ADSL line: earlier it was on their LAN.

Found lots of hostname not found errors in /var/log/maillog

host -t MX was not returning anything, while
host -A MX was working.

cat /etc/resolve.conf gave

search localdomain

So the ADSL router was specifically blocking -t MX! Added a working dns server, BSNL's nameserver, after checking
host -t MX was working fine.

After /sbin/service network restart
when I did
cat /etc/resolve.conf

I again found it had gone back to
search localdomain

Found this by googling 'resolv.conf updated from network restart':
When you are connecting to a network that's using a DHCP-server, it's possible
that the settings you have placed in /etc/resolv.conf are overwritten
everytime you receive a DHCP-lease. You can prevent this by adding the
following line to /etc/sysconfig/network-scripts/ifcfg-eth0

So I added that, then did
/sbin/service network restart

Then cat /etc/resolv.conf gave
search localdomain

host -t MX gave mail is handled by 10 mail is handled by 10 mail is handled by 50 mail is handled by 50 mail is handled by 5

So now seems good. And I got a test mail too.

No comments:

Post a Comment