Unable to send mail: Suspect DNS

Discussion in 'Installation/Configuration' started by seangee, Jun 15, 2007.

  1. seangee

    seangee New Member

    Hi

    I have set up a mailserver using the excellent tutorial for Debian Etch and ISPconfig. I have done this in a VM so that I can rebuild my old mailserver (which is fine but a bit tricky to administer because it was my first foray into Linux, postfix etc).

    Installation was fine and ftp and web servers are ok (only tested internally using hosts file on my mac).

    When I tried to send a mail using a web client I got the following error:
    Code:
    Jun 15 18:31:24 deb-dbserver postfix/smtp[3975]: D4C68E7D1E: to=<[email protected]>, relay=none, delay=20, delays=0.05/0.03/20/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=relay.myisp.net type=MX: Host not found, try again)
    
    I only added the relay because I got the same error without it and I know this works from my existing server.

    I also found this error in my logs:
    Code:
    Jun 15 17:25:24 deb-dbserver freshclam[2764]: Can't query current.cvd.clamav.net 
    Jun 15 17:25:24 deb-dbserver freshclam[2764]: Invalid DNS reply. Falling back to HTTP mode. 
    Jun 15 17:25:24 deb-dbserver freshclam[2764]: Reading CVD header (main.cvd): 
    Jun 15 17:25:24 deb-dbserver freshclam[2764]: OK (IMS) 
    Jun 15 17:25:24 deb-dbserver freshclam[2764]: main.cvd is up to date (version: 43, sigs: 104500, f-level: 14, builder: sven) 
    Jun 15 17:25:24 deb-dbserver freshclam[2764]: Reading CVD header (daily.cvd): 
    Jun 15 17:25:25 deb-dbserver freshclam[2764]: OK 
    
    I know that I have a route to both servers cos I can ping them.

    I don't know anything about DNS but have made the following changes with no effect after searching the forums:
    Added port 53 as allowed both directions for tcp/udp in my firewall (netgear router).

    Made the ff changes to /var/lib/named/etc/bind/named.conf.options

    Code:
             query-source address * port 53;
    
            // If your ISP provided one or more IP addresses for stable 
            // nameservers, you probably want to use them as forwarders.  
            // Uncomment the following block, and insert the addresses replacing 
            // the all-0's placeholder.
    
             forwarders {
                    xxx.xxx.x.9;
                    xxx.xxx.x.10;
    // got these from my router
             };
    
    As I don't currently have a DNS server what should my config look like.

    Many thanks
     
    Last edited: Jun 15, 2007
  2. seangee

    seangee New Member

    More info

    Here is the output of /var/log/daemon.log when I restart the bind9 service:
    Code:
    Jun 15 21:13:35 deb-dbserver named[3401]: starting BIND 9.3.4 -u bind -t /var/lib/named
    Jun 15 21:13:35 deb-dbserver named[3401]: found 1 CPU, using 1 worker thread
    Jun 15 21:13:35 deb-dbserver named[3401]: loading configuration from '/etc/bind/named.conf'
    Jun 15 21:13:35 deb-dbserver named[3401]: listening on IPv4 interface lo, 127.0.0.1#53
    Jun 15 21:13:35 deb-dbserver named[3401]: listening on IPv4 interface eth1, 192.168.0.202#53
    Jun 15 21:13:35 deb-dbserver named[3401]: command channel listening on 127.0.0.1#953
    Jun 15 21:13:35 deb-dbserver named[3401]: command channel listening on ::1#953
    Jun 15 21:13:35 deb-dbserver named[3401]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1
    Jun 15 21:13:35 deb-dbserver named[3401]: zone 0.168.192.in-addr.arpa/IN: loaded serial 2007061401
    Jun 15 21:13:35 deb-dbserver named[3401]: zone gatesworld.local/IN: loaded serial 2007061401
    Jun 15 21:13:35 deb-dbserver named[3401]: running
    
    Also here is the output from dig:
    Code:
    ; <<>> DiG 9.3.4 <<>> google.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59008
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 4
    
    ;; QUESTION SECTION:
    ;google.com.                    IN      A
    
    ;; ANSWER SECTION:
    google.com.             86      IN      A       72.14.207.99
    google.com.             86      IN      A       64.233.167.99
    google.com.             86      IN      A       64.233.187.99
    
    ;; AUTHORITY SECTION:
    google.com.             144791  IN      NS      ns3.google.com.
    google.com.             144791  IN      NS      ns4.google.com.
    google.com.             144791  IN      NS      ns1.google.com.
    google.com.             144791  IN      NS      ns2.google.com.
    
    ;; ADDITIONAL SECTION:
    ns1.google.com.         278679  IN      A       216.239.32.10
    ns2.google.com.         278679  IN      A       216.239.34.10
    ns3.google.com.         278679  IN      A       216.239.36.10
    ns4.google.com.         278679  IN      A       216.239.38.10
    
    ;; Query time: 26 msec
    ;; SERVER: 192.168.0.1#53(192.168.0.1)
    ;; WHEN: Fri Jun 15 21:41:11 2007
    ;; MSG SIZE  rcvd: 212
    
    Not sure what these should be but the last ip address from the dig output is that of my router.

    Hope this helps someone ...
     
  3. seangee

    seangee New Member

    So I have done some research on dig and tried again getting it to use my nameserver. I have now taken the forwarders out of named.conf cos it doesn't make any difference. Also ran it twice to prove that it is going into cache. Even after that I get the original error.

    deb-dbserver.gatesworld.local is the dns entry in ISPConfig. I have also tried using the ip address and localhost.

    Code:
    deb-dbserver:/var/lib/named/etc/bind# dig @deb-dbserver.gatesworld.local relay.force9.net
    
    ; <<>> DiG 9.3.4 <<>> @deb-dbserver.gatesworld.local relay.myisp.net
    ; (1 server found)
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16468
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;relay.myisp.net.              IN      A
    
    ;; ANSWER SECTION:
    relay.myisp.net.       86400   IN      A       212.159.11.37
    
    ;; AUTHORITY SECTION:
    myisp.net.             86400   IN      NS      ns1.force9.net.
    myisp.net.             86400   IN      NS      ns2.force9.net.
    
    ;; Query time: 246 msec
    ;; SERVER: 192.168.0.202#53(192.168.0.202)
    ;; WHEN: Fri Jun 15 22:21:19 2007
    ;; MSG SIZE  rcvd: 86
    
    deb-dbserver:/var/lib/named/etc/bind# dig @deb-dbserver.gatesworld.local relay.myisp.net
    
    ; <<>> DiG 9.3.4 <<>> @deb-dbserver.gatesworld.local relay.myisp.net
    ; (1 server found)
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64938
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;relay.myisp.net.              IN      A
    
    ;; ANSWER SECTION:
    relay.myisp.net.       86394   IN      A       212.159.11.37
    
    ;; AUTHORITY SECTION:
    myisp.net.             86394   IN      NS      ns2.force9.net.
    myisp.net.             86394   IN      NS      ns1.force9.net.
    
    ;; Query time: 2 msec
    ;; SERVER: 192.168.0.202#53(192.168.0.202)
    ;; WHEN: Fri Jun 15 22:21:25 2007
    ;; MSG SIZE  rcvd: 86
    
     
  4. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/resolv.conf?
     
  5. seangee

    seangee New Member

    Thanks mate - it was pointing at my router - all working fine now
     

Share This Page