Found lots of hostname not found errors in /var/log/maillog
host -t MX gmail.com was not returning anything, while
host -A MX gmail.com was working.
cat /etc/resolve.conf gave
nameserver 192.168.1.1
search localdomain
So the ADSL router was specifically blocking -t MX! Added a working dns server, BSNL's nameserver 61.1.96.69, after checking
host -t MX gmail.com 61.1.96.69 was working fine.
After /sbin/service network restart
when I did
cat /etc/resolve.conf
I again found it had gone back to
nameserver 192.168.1.1
search localdomain
Found this by googling 'resolv.conf updated from network restart':
http://linux.cudeso.be/linuxdoc/tweaky_net.php
saying
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
PEERDNS=no
So I added that, then did
/sbin/service network restart
Then cat /etc/resolv.conf gave
search localdomain
nameserver
nameserver
and
host -t MX gmail.com gave
gmail.com mail is handled by 10 alt1.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 10 alt2.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 50 gsmtp163.google.com.
gmail.com mail is handled by 50 gsmtp183.google.com.
gmail.com mail is handled by 5 gmail-smtp-in.l.google.com.
So now seems good. And I got a test mail too.
No comments:
Post a Comment