Postfix not send email to remote domains

Zauny

Valued Member
I am getting errors like,
Host or domain name not found. Name service error for name=hotmail.com type=MX: Host not found, try again

any help will be greatly appreciated...
 

EQ Admin

EQ Forum Admin
Staff member
Check your /etc/resolv.conf

What IP addresses are you using for your DNS lookups?

Are you familiar with the dig command?

If your current resolver settings are not working does 8.8.8.8 work for you?

Using Google DNS while troubleshooting the local problem is a good workaround to keep your mail flowing.

:welcome: to Email Questions!
 

Zauny

Valued Member
this is my resolv.conf
# Generated by NetworkManager
APPSERVER 10.19.1.71
dns-server 10.19.0.11
ns1.btl.net 200.32.248.1
ns2.btl.net 200.32.218.132

sadly I am not familiar with the dig command. how do I set it google DNS?
 

Zauny

Valued Member
dig @8.8.8.8 gmail.com
; <<>> DiG 9.5.1-P2 <<>> @8.8.8.8 gmail.com
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13872
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;gmail.com. IN A

;; ANSWER SECTION:
gmail.com. 300 IN A 173.194.115.53
gmail.com. 300 IN A 173.194.115.54

;; Query time: 97 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Sep 4 18:10:48 2013
;; MSG SIZE rcvd: 59
 

EQ Admin

EQ Forum Admin
Staff member
Your resolv.conf is broken.

It looks like it got replaced with the contents of an /etc/hosts file.

Until you are able to identify what IP's should be in there change your /etc/resolv.conf to a single line:

nameserver 8.8.8.8

It's probably fine sticking with 8.8.8.8 if you want, but most likely there is a faster local option available to you that you can get from your IT/network admins or hosting provider.
 

EQ Admin

EQ Forum Admin
Staff member
It's also worth investigating how the /etc/resolv.conf was overwritten to help make sure it doesn't happen again.

Double check and make sure that neither /etc/hosts or /etc/resolv.conf are links to each other.

Maybe someone accidentally updated the /etc/resolv.conf while trying to make an /etc/hosts update?
 

Zauny

Valued Member
this is the change I made to resolv.conf and my email are going once more. (I added 8.8.8.8 and 8.8.4.4)

APPSERVER 10.19.1.71
dns-server 10.19.0.11
ns1.btl.net 200.32.248.1
ns2.btl.net 200.32.218.132
nameserver 8.8.8.8
nameserver 8.8.4.4

my question now is, would the command postqueue -s all immediately reschedule all message in mailq?
 

EQ Admin

EQ Forum Admin
Staff member
Hi Zauny,

Try postqueue -f instead of postqueue -s

Also, it's best if you make a note to save them but remove these lines from your /etc/resolv.conf:

APPSERVER 10.19.1.71
dns-server 10.19.0.11
ns1.btl.net 200.32.248.1
ns2.btl.net 200.32.218.132

It doesn't appear that they are causing a problem still existing there, but the only lines that should be in that file start with nameserver, search, domain, and possibly some options lines.
 

Zauny

Valued Member
Thanks Popowich, I was working this issue for most of today. Thanks again... if it a bother can I send you my main.cf for you to look over and give some suggestion on how to improve it. My Skype user is edward.young9375, please free to add me. :)
 
Top