cant send mail to external accounts like gmail [solved]

problem

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

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct