Host or domain name not found

Hello to all,

I need your help urgently, suddenly without changing anything, I can not send emails outside my domain from email logs I find this:

Jan 18 14:20:01 server1 dovecot: pop3-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Jan 18 14:20:01 server1 dovecot: imap-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Jan 18 14:20:01 server1 postfix/smtpd[2285]: connect from localhost[127.0.0.1]
Jan 18 14:20:01 server1 postfix/smtpd[2285]: lost connection after CONNECT from localhost[127.0.0.1]
Jan 18 14:20:01 server1 postfix/smtpd[2285]: disconnect from localhost[127.0.0.1]
Jan 18 14:25:01 server1 dovecot: pop3-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Jan 18 14:25:01 server1 dovecot: imap-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Jan 18 14:25:01 server1 postfix/smtpd[2356]: connect from localhost[127.0.0.1]
Jan 18 14:25:01 server1 postfix/smtpd[2356]: lost connection after CONNECT from localhost[127.0.0.1]
Jan 18 14:25:01 server1 postfix/smtpd[2356]: disconnect from localhost[127.0.0.1]
Jan 18 14:30:01 server1 dovecot: pop3-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Jan 18 14:30:01 server1 dovecot: imap-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Jan 18 14:30:01 server1 postfix/smtpd[2430]: connect from localhost[127.0.0.1]
Jan 18 14:30:01 server1 postfix/smtpd[2430]: lost connection after CONNECT from localhost[127.0.0.1]
Jan 18 14:30:01 server1 postfix/smtpd[2430]: disconnect from localhost[127.0.0.1]
Jan 18 14:32:10 server1 postfix/qmgr[9837]: BAF71C164: from=, size=1274, nrcpt=1 (queue active)
Jan 18 14:33:06 server1 postfix/smtp[2466]: BAF71C164: to=, relay=none, delay=58400, delays=58344/0.04/56/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=gmail.com type=MX: Host not found, try again)
Jan 18 14:35:02 server1 dovecot: pop3-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Jan 18 14:35:02 server1 dovecot: imap-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Jan 18 14:35:02 server1 postfix/smtpd[2508]: connect from localhost[127.0.0.1]
Jan 18 14:35:02 server1 postfix/smtpd[2508]: lost connection after CONNECT from localhost[127.0.0.1]
Jan 18 14:35:02 server1 postfix/smtpd[2508]: disconnect from localhost[127.0.0.1]
Jan 18 14:37:10 server1 postfix/qmgr[9837]: 319BCC166: from=, size=1650, nrcpt=1 (queue active)
Jan 18 14:37:10 server1 postfix/qmgr[9837]: 4F419C162: from=, size=1529, nrcpt=1 (queue active)
Jan 18 14:37:10 server1 postfix/qmgr[9837]: D9548C16C: from=<>, size=3858, nrcpt=1 (queue active)
Jan 18 14:38:06 server1 postfix/smtp[2542]: 319BCC166: to=, relay=none, delay=46615, delays=46559/0.06/56/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=pillsshop.info type=MX: Host not found, try again)
Jan 18 14:38:06 server1 postfix/smtp[2543]: 4F419C162: to=, relay=none, delay=46614, delays=46558/0.02/56/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=gmail.com type=MX: Host not found, try again)
Jan 18 14:38:06 server1 postfix/smtp[2544]: D9548C16C: to=, relay=none, delay=27953, delays=27897/0.03/56/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=risparmio-mail.com type=MX: Host not found, try again)
Jan 18 14:40:01 server1 dovecot: pop3-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Jan 18 14:40:01 server1 dovecot: imap-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Jan 18 14:40:01 server1 postfix/smtpd[2602]: connect from localhost[127.0.0.1]
Jan 18 14:40:01 server1 postfix/smtpd[2602]: lost connection after CONNECT from localhost[127.0.0.1]
Jan 18 14:40:01 server1 postfix/smtpd[2602]: disconnect from localhost[127.0.0.1]
Jan 18 14:42:10 server1 postfix/qmgr[9837]: A02CFC134: from=<>, size=3189, nrcpt=1 (queue active)
Jan 18 14:43:06 server1 postfix/smtp[2640]: A02CFC134: to=, relay=none, delay=4709, delays=4653/0.04/56/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=gmail.com type=MX: Host not found, try again)
Jan 18 14:45:02 server1 dovecot: pop3-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Jan 18 14:45:02 server1 dovecot: imap-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Jan 18 14:45:02 server1 postfix/smtpd[2683]: connect from localhost[127.0.0.1]
Jan 18 14:45:02 server1 postfix/smtpd[2683]: lost connection after CONNECT from localhost[127.0.0.1]
Jan 18 14:45:02 server1 postfix/smtpd[2683]: disconnect from localhost[127.0.0.1]
Jan 18 14:47:10 server1 postfix/qmgr[9837]: A983CC158: from=, size=824, nrcpt=1 (queue active)
Jan 18 14:48:06 server1 postfix/smtp[2771]: A983CC158: to=, relay=none, delay=42491, delays=42435/0.04/56/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=gmail.com type=MX: Host not found, try again)
Jan 18 14:50:02 server1 dovecot: pop3-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Jan 18 14:50:02 server1 dovecot: imap-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured

In my /etc/resolv.conf and /var/spool/postfix/etc/resolv.conf I have this:

domains members.linode.com
search members.linode.com
nameserver 109.74.192.20
nameserver 109.74.193.20
nameserver 109.74.194.20

Why can not I send email?

Please I need urgent help.

thanks

36 Replies

Are you running Plesk by any chance? If so, this may be a problem introduced with MU10 or MU11. Try updating from Plesk.

In the mean time try this from the command line:

restorecon /etc/resolv.conf

postqueue -f

MSJ

Have you tried the 'restorecon /etc/resolv.conf' command?

What happens when you dig or ping a domain? Can either of those resolve the host?

With the command restoreconf says:

-bash: restorecon: command not found

With the ping command responds back to me the ip of my linode.

What else can I do?

Ping or dig another domain to see if you can resolve the domain. For example:

ping gmail.com

dig gmail.com mx

ping cnn.com

dig cnn.com mx

ping linode.com

dig linode.com mx

Running the command ping gmail.com

takes a long time and finally the result is:

ping: unknow host gmail.com

while running the command: dig gmail.com mx, the result is as follows:

connection timeout; no servers could br reached.

Same result for the other domains.

Why does this happen?

You're obviously not properly connecting to a nameserver or DNS servers.

What is in your hosts file?

Content file /etc/hosts

127.0.0.1 localhost
178.79.155.249    server1.queeninformatica.it server1

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

domains members.linode.com search members.linode.com nameserver 109.74.192.20 nameserver 109.74.193.20 nameserver 109.74.194.20

I don't think domain is supposed to be plural. What happens if you change it to singular 'domain' instead of 'domains'? After you change it try to ping another domain again.

In fact, I changed from domains in domain in this way:

domain members.linode.com
search members.linode.com
nameserver 109.74.192.20
nameserver 109.74.193.20
nameserver 109.74.194.20

I restarted networking, then I launched:

dig gmail.com mx

but the result is the same:

connection timeout; no servers could br reached.

What linux distribution & version are you running?

Debian5

I know it's old, but I can not update because I have sites that run only on php 5.2.

So I'm afraid that updating the above sites would no longer work.

What I can say is that until a few days ago everything was working, suddenly the emails stopped working for no apparent reason.

I'm not here to judge your choice of linux ;-) Knowing helps when weeding through search results.

Did ISPConfig update recently? Have you tried their support forums?

Have you checked all the logs to see what type of error they have when you try to ping or dig?

Have you tried rebooting your server?

Thank you for your help, the answer to points:

I have not updated ispconfig and I have not even asked on their forum because I believe in truth that is not the problem.

I rebooted the server, but nothing changes.

I have not checked the error log ping or dig.

Where is it?

Thank you again.

I'm not sure which logs will have those errors. Try going to /var/log then do a dig and then sort by date.

BTW, did you recently turn on IP6?

Now check the log, but I have not turned on ipv6

I'm not a networking guy so I'm not sure how much more help I can provide. Have you tried a Debian forum?

Yes I have searched around, but I can not solve.

Based on what you said the output of "dig gmail.com mx" was, you seem to have network issues, at least issues connecting to the DNS servers listed in /etc/resolv.conf

Please paste the output of iptables-save , ip addr , and ip route show table all .

iptables-save:

:OUTPUT ACCEPT [324844:23039433]
:POSTROUTING ACCEPT [324844:23039433]                                                                 
COMMIT                                                                                                
# Completed on Sun Jan 19 02:31:21 2014                                                               
# Generated by iptables-save v1.4.2 on Sun Jan 19 02:31:21 2014                                       
*mangle                                                                                               
:PREROUTING ACCEPT [2354424:284655383]                                                                
:INPUT ACCEPT [2354343:284651291]                                                                     
:FORWARD ACCEPT [0:0]                                                                                 
:OUTPUT ACCEPT [2855189:2701890942]                                                                   
:POSTROUTING ACCEPT [2855189:2701890942]                                                              
COMMIT                                                                                                
# Completed on Sun Jan 19 02:31:21 2014                                                               
# Generated by iptables-save v1.4.2 on Sun Jan 19 02:31:21 2014                                       
*filter                                                                                               
:INPUT ACCEPT [2354343:284651291]                                                                     
:FORWARD ACCEPT [0:0]                                                                                 
:OUTPUT ACCEPT [2855189:2701890942]                                                                   
:fail2ban-ssh - [0:0]                                                                                 
-A INPUT -p tcp -m multiport --dports 22 -j fail2ban-ssh                                              
-A fail2ban-ssh -j RETURN                                                                             
COMMIT                                                                                                
# Completed on Sun Jan 19 02:31:21 2014 

ip addr:

3: eth0: <broadcast,multicast,up,lower_up>mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether fe:fd:b2:4f:9b:f9 brd ff:ff:ff:ff:ff:ff
    inet 178.79.155.249/24 brd 178.79.155.255 scope global eth0                                       
       valid_lft forever preferred_lft forever                                                        
    inet6 fe80::fcfd:b2ff:fe4f:9bf9/64 scope link                                                     
       valid_lft forever preferred_lft forever                                                        
4: teql0: <noarp>mtu 1500 qdisc noop state DOWN qlen 100                                             
    link/void                                                                                         
5: tunl0: <noarp>mtu 0 qdisc noop state DOWN                                                         
    link/ipip 0.0.0.0 brd 0.0.0.0                                                                     
6: gre0: <noarp>mtu 1476 qdisc noop state DOWN                                                       
    link/gre 0.0.0.0 brd 0.0.0.0                                                                      
7: gretap0: <broadcast,multicast>mtu 1476 qdisc noop state DOWN qlen 1000                            
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff                                                
8: ip_vti0@NONE: <noarp>mtu 1500 qdisc noop state DOWN                                               
    link/ipip 0.0.0.0 brd 0.0.0.0                                                                     
9: sit0: <noarp>mtu 1480 qdisc noop state DOWN                                                       
    link/sit 0.0.0.0 brd 0.0.0.0                                                                      
10: ip6tnl0: <noarp>mtu 1452 qdisc noop state DOWN                                                   
    link/tunnel6 :: brd ::                                                                            
11: ip6gre0: <noarp>mtu 1448 qdisc noop state DOWN                                                   
    link/[823] 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00
:00:00:00:00</noarp></noarp></noarp></noarp></broadcast,multicast></noarp></noarp></noarp></broadcast,multicast,up,lower_up> 

ip route show table all:

9: sit0: <noarp>mtu 1480 qdisc noop state DOWN
    link/sit 0.0.0.0 brd 0.0.0.0                                                                      
10: ip6tnl0: <noarp>mtu 1452 qdisc noop state DOWN                                                   
    link/tunnel6 :: brd ::                                                                            
11: ip6gre0: <noarp>mtu 1448 qdisc noop state DOWN                                                   
    link/[823] 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00
:00:00:00:00                                                                                          
server1:~# ip route show table all                                                                    
default via 178.79.155.1 dev eth0                                                                     
178.79.155.0/24 dev eth0  proto kernel  scope link  src 178.79.155.249                                
broadcast 127.0.0.0 dev lo  table local  proto kernel  scope link  src 127.0.0.1                      
local 127.0.0.0/8 dev lo  table local  proto kernel  scope host  src 127.0.0.1                        
local 127.0.0.1 dev lo  table local  proto kernel  scope host  src 127.0.0.1                          
broadcast 127.255.255.255 dev lo  table local  proto kernel  scope link  src 127.0.0.1                
broadcast 178.79.155.0 dev eth0  table local  proto kernel  scope link  src 178.79.155.249            
local 178.79.155.249 dev eth0  table local  proto kernel  scope host  src 178.79.155.249              
broadcast 178.79.155.255 dev eth0  table local  proto kernel  scope link  src 178.79.155.249          
fe80::/64 dev eth0  proto kernel  metric 256                                                          
unreachable default dev lo  table unspec  proto kernel  metric -1  error -101                         
local ::1 dev lo  table local  proto none  metric 0                                                   
local fe80::fcfd:b2ff:fe4f:9bf9 dev lo  table local  proto none  metric 0                             
ff00::/8 dev eth0  table local  metric 256                                                            
unreachable default dev lo  table unspec  proto kernel  metric -1  error -101</noarp></noarp></noarp> 

Firewall is fine. Network interface UP and route table looks fine.

Could you paste the output of dig gmail.com MX ?

Result:

; <<>> DiG 9.6-ESV-R4 <<>> gmail.com MX

;; global options: +cmd

;; connection timed out; no servers could be reached

Okay, now try dig @109.74.192.20 gmail.com MX and if that fails traceroute 109.74.192.20

dig @109.74.192.20 gmail.com MX:

; <<>> DiG 9.6-ESV-R4 <<>> @109.74.192.20 gmail.com MX
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

traceroute 109.74.192.20:

traceroute to 109.74.192.20 (109.74.192.20), 30 hops max, 40 byte packets
 1  * * *
...
30  * * *

It appears you're connecting to the Linode using LiSH instead of regular SSH. Are you unable to connect to it via SSH? Are you able to connect to other services running on the Linode?

That and the fact that dig can't connect to another Linode server to resolve domain names makes me think your networking is massively hosed. Are you able to ping 178.79.155.1 ?

You need to start with the basics.

If you're not using IPv6, then remove it.

Can you ping 74.125.225.181?

Can you ping http://www.gmail.com?

If you can the first but not the second, then your name resolution is fubar'd.

Remove everything from your /etc/resolv.conf and just put in:

nameserver 8.8.8.8

nameserver 8.8.4.4

Then try ping http://www.gmail.com

If that doesn't work, it's a real puzzle, and I'd start to think your system had been compromised?

It would also help if you show the COMMAND and the RESULTS in your code snips, dumber things have happened when all parties ASSUME that the command is being entered correctly.

I can connect with putty via ssh, but if I try to access ftp with root gives me connection timeout.

Result ping:

PING 178.79.155.1 (178.79.155.1) 56(84) bytes of data.
64 bytes from 178.79.155.1: icmp_seq=1 ttl=255 time=1.08 ms
...
64 bytes from 178.79.155.1: icmp_seq=22 ttl=255 time=0.958 ms

^C
--- 178.79.155.1 ping statistics ---
47 packets transmitted, 47 received, 0% packet loss, time 46058ms
rtt min/avg/max/mdev = 0.846/1.734/12.741/2.256 ms

Result ping 74.125.225.181:

PING 74.125.225.181 (74.125.225.181) 56(84) bytes of data.
64 bytes from 74.125.225.181: icmp_seq=1 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=2 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=3 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=4 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=5 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=6 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=7 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=8 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=9 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=10 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=11 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=12 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=13 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=14 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=15 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=16 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=17 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=18 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=19 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=20 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=21 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=22 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=23 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=24 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=25 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=26 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=27 ttl=52 time=116 ms
64 bytes from 74.125.225.181: icmp_seq=28 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=29 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=30 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=31 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=32 ttl=52 time=115 ms
64 bytes from 74.125.225.181: icmp_seq=33 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=34 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=35 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=36 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=37 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=38 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=39 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=40 ttl=52 time=113 ms
64 bytes from 74.125.225.181: icmp_seq=41 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=42 ttl=52 time=114 ms
64 bytes from 74.125.225.181: icmp_seq=43 ttl=52 time=113 ms
^C
--- 74.125.225.181 ping statistics ---
43 packets transmitted, 43 received, 0% packet loss, time 42068ms
rtt min/avg/max/mdev = 113.189/114.004/116.166/0.842 ms

Ping http://www.gmail.com:

ping: unknown host http://www.gmail.com

About ten days ago, telling me that my linode server was receiving a dos attack, but I took countermeasures almost immediately by blocking the root user. Ill problem was solved almost immediately.

Now I try to change the resolv.conf and I'll let you know.

I changed the file /etc/resolv.conf like this:

nameserver 8.8.8.8
nameserver 8.8.4.4

I did the ping http://www.google.com and I get this:

ping: unknown host http://www.gmail.com

I'm sorry, I can not understand what you need when you say this:
> It would also help if you show the COMMAND and the RESULTS in your code snips, dumber things have happened when all parties ASSUME that the command is being entered correctly.

@vincenzo:

I did the ping http://www.google.com and I get this:

ping: unknown host http://www.gmail.com

You should not have added the "http://" when running that command. I'm told that the forum software automatically added that to the other guy's post.

Try again with just````
ping www.gmail.com

<quote author="vincenzo">~~@vincenzo:~~ 

> I'm sorry, I can not understand what you need when you say this:
>  <quote>> It would also help if you show the COMMAND and the RESULTS in your code snips, dumber things have happened when all parties ASSUME that the command is being entered correctly.</quote></quote> 

He means, when you paste the output of a command we ask you to run, include the part that shows the command:

server1:~# ping www.google.com
PING www.google.com (173.194.115.82) 56(84) bytes of data.

````

I would bet $5 that your Linode was being used to outbound DoS, and so Linode took action to stop the flow of traffic. As a result of that, you can't access anything over UDP, such as DNS or traceroute (which uses UDP by default). If you resolved the ToS Violation ticket Linode opened to their satisfaction, you should ask them to remove the attack mitigation.

-Doug

Ok, sorry :)

Here is the command and the result:

server1:~# ping www.gmail.com
ping: unknown host www.gmail.com

It is accurate.

But the ticket has been closed at least 7/8 days ago.

So I have to ask them?

Boy, he was right dwfreed.

Linode has reset the network configuration manually, it all works now.

I've lost many days for this …

Thank you to all of my heart for your help.

vincenzo - the lesson here is to always follow up with Linode's tech support. If they had to take action regarding your VPS then they are always a good place to start.

dwfreed - good call and great insight.

I explained to them the problem, but they told me to turn here on the forum

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