cant send mail to external accounts like gmail [solved]
tried to send an email to my gmail account and couldn't do so. i could a few days ago.. wtf???
i did a mailq and found my emails stuck in the mail queue with the following error
Name service error for name=gmail.com type=MX: Host not found, try again
the mail log showed a similar error.
well it turns out that since i started using nodebalancing and had to change to a static ip address
my build of ubuntu would delete the /etc/resolv.conf file upon reboot
i putted around and support had me add the dns-nameservers to the /etc/network/interfaces file in the format below…
address 1.2.3.4
netmask 255.255.255.0
gateway 1.2.3.1
dns-nameservers 88.88.88.88 99.99.99.99
then i ran
ifdown eth0; ifup eth0
to restart the network
then i purged the mail queue by using "postqueue -f" command
then all the mail that was stuck in the queue for gmail etc… were fired off
after doing that the nameservers stuck even after rebooting… and everything ran happily ever after