Postfix not send email to remote domains

Discussion in 'Help Desk' started by Zauny, Sep 4, 2013.

  1. Zauny

    Zauny Valued Member

    Joined:
    Sep 4, 2013
    Messages:
    34
    Likes Received:
    0
    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...
     


  2. popowich

    popowich EQ Forum Admin Staff Member

    Joined:
    Aug 12, 2008
    Messages:
    8,994
    Likes Received:
    120
    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!
     

  3. Zauny

    Zauny Valued Member

    Joined:
    Sep 4, 2013
    Messages:
    34
    Likes Received:
    0
    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?
     
  4. Zauny

    Zauny Valued Member

    Joined:
    Sep 4, 2013
    Messages:
    34
    Likes Received:
    0
    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
     
  5. popowich

    popowich EQ Forum Admin Staff Member

    Joined:
    Aug 12, 2008
    Messages:
    8,994
    Likes Received:
    120
    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.
     
  6. popowich

    popowich EQ Forum Admin Staff Member

    Joined:
    Aug 12, 2008
    Messages:
    8,994
    Likes Received:
    120
    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?
     
  7. Zauny

    Zauny Valued Member

    Joined:
    Sep 4, 2013
    Messages:
    34
    Likes Received:
    0
    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?
     
  8. popowich

    popowich EQ Forum Admin Staff Member

    Joined:
    Aug 12, 2008
    Messages:
    8,994
    Likes Received:
    120
    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.
     
  9. Zauny

    Zauny Valued Member

    Joined:
    Sep 4, 2013
    Messages:
    34
    Likes Received:
    0
    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. :)
     

Want to reply or ask your own question?

It only takes a minute to sign up (and it's free!). Click the orange sign up button to choose a username and then you can ask your own questions on the forum.
Loading...