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
So the ADSL router was specifically blocking -t MX! Added a working dns server, BSNL's nameserver 188.8.131.52, after checking
host -t MX gmail.com 184.108.40.206 was working fine.
After /sbin/service network restart
when I did
I again found it had gone back to
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
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.