BIND Not Responding Properly to Dig Requests

Discussion in 'Installation/Configuration' started by jonwatson, Feb 6, 2008.

  1. jonwatson

    jonwatson New Member

    Hello,

    I'm having a problem with an ISPConfig installation, specifically with BIND.

    I can't post the domain because it is not my box, but here is the problem using example.com. ISPConfig is installed on host.server.net

    pri.example.com file:
    Code:
    $TTL        86400
    @       IN      SOA     host.server.net. admin.example.com. (
                            2008020606       ; serial, todays date + todays serial #
                            28800              ; refresh, seconds
                            7200              ; retry, seconds
                            604800              ; expire, seconds
                            86400 )            ; minimum, seconds
    ;
                    NS      host.server.net.              ; Inet Address of name server 1
                    NS      host.server.net.              ; Inet Address of name server 2
    ;
    
    mail.example.com  MX      10 216.254.178.179.
    
    example.com.      A        67.69.17.174
    example.com.       TXT  "v=spf1 a mx ptr ~all"
    
    ;;;; MAKE MANUAL ENTRIES BELOW THIS LINE! ;;;;
    BIND is running without errors. However, when I attempt to dig the MX record from host.server.net, it doesn't return the MX record:

    Code:
     dig @host.server.net  mx example.com
    
    ; <<>> DiG 9.4.1-P1 <<>> @host.server.net mx example.com
    ; (1 server found)
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39353
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;example.com.             IN      MX
    
    ;; AUTHORITY SECTION:
    example.com.      86400   IN      SOA     host.server.net. admin.example.com. 2008020606 28800 7200 604800 86400
    
    ;; Query time: 291 msec
    ;; SERVER: host.server.net#53(host.server.net)
    ;; WHEN: Wed Feb  6 17:15:33 2008
    ;; MSG SIZE  rcvd: 96
    It does give out A records without a problem, it's just the MX record that I can't get:

    Code:
    dig @host.server.net  example.com
    
    ; <<>> DiG 9.4.1-P1 <<>> @host.server.net example.com
    ; (1 server found)
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58210
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;example.com.             IN      A
    
    ;; ANSWER SECTION:
    example.com.      86400   IN      A       67.69.17.174
    
    ;; AUTHORITY SECTION:
    example.com.      86400   IN      NS      host.server.net.
    
    ;; Query time: 212 msec
    ;; SERVER: host.server.net#53(host.server.net)
    ;; WHEN: Wed Feb  6 17:18:39 2008
    ;; MSG SIZE  rcvd: 84
    I have restarted BIND and manually checked the files, but I just can't see it.

    Anyone know why BIND isn't giving out MX records when requested?
     
  2. topdog

    topdog Active Member HowtoForge Supporter

    Your setup is wrong. You need this
    Code:
    example.com MX 10 mail.example.com.
    mail.example.com A xxx.xxx.xxx.xxx
    
    Right now what you have is an mx record for the mail.example.com domain not example.com

    NOTE: on a side note RFC requirements do not allow you to have an IP address as a MX it should be a name
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    To get the correct MX record, leve the host field empty in the mx record form in ISPConfig.
     
  4. jonwatson

    jonwatson New Member

    Awesome, thanks for the help. Just leaving the host name blank cleaned it all up.

    Jon
     

Share This Page