Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Help: Split DNS: dig on MX gives double/repeated domain

  1. #1
    strafford is offline Loyal Member
    Join Date
    Apr 2008
    Location
    Brighton, ON, Canada
    Posts
    89
    Rep Power
    7

    Default Help: Split DNS: dig on MX gives double/repeated domain

    I have setup a split DNS and most is working except when I do a dig (for mx record) I get a double domain answer.

    dig +short mydomain.com mx:
    Code:
    10 mailserv.mydomain.com.mydomain.com.
    This should be mailserv.mydomain.com shouldn't it? I have searched a bunch of posts and here is the info that is most often requested.

    dig +short mydomain.com any:
    Code:
    mydomain.com. scott.mydomain.com. 70728 604800 86400 2419200 604800
    192.168.7.101.mydomain.com.
    192.168.7.101
    10 mailserv.mydomain.com.mydomain.com.
    /etc/hosts:
    Code:
    127.0.0.1       localhost.localdomain localhost
    192.168.7.101   mailserv.mydomain.com mailserv
    /etc/resolv.conf:
    Code:
    nameserver 192.168.7.101
    host `hostname`:
    Code:
    Host mailserv not found: 3(NXDOMAIN)
    /etc/bind/named.conf.options:
    Code:
    options {
            auth-nxdomain no;    # conform to RFC1035
            query-source address * port 53;
            directory "/var/named";
            dump-file "/var/named/data/cache_dump.db";
            statistics-file "/var/named/data/named_stats.txt";
            forwarders { 24.226.1.93; 24.226.10.193; };
    };
    include "/etc/bind/rndc.key";
    zone "mydomain.com" {
            type master;
            file "/var/named/db.mydomain.com";
    };
    /var/named/db.mydomain.com:
    Code:
    ;
    ; BIND data file for mydomain.com
    ;
    $TTL    604800
    @       IN      SOA     mydomain.com. scott.mydomain.com. (
                             070729         ; Serial
                             604800         ; Refresh
                              86400         ; Retry
                            2419200         ; Expire
                             604800 )       ; Negative Cache TTL
    ;
    @       IN      NS      192.168.7.101
            IN      A       192.168.7.101
            IN      MX      10 mailserv.mydomain.com
    mailserv        IN      A       192.168.7.101
    nslookup:
    Code:
    Server:         192.168.7.101
    Address:        192.168.7.101#53
    
    Name:   mailserv.mydomain.com
    Address: 192.168.7.101
    Any help would be greatly appreciated.

    Regards,
    Scott
    Last edited by strafford; 04-09-2010 at 11:56 AM. Reason: clarify subject

  2. #2
    strafford is offline Loyal Member
    Join Date
    Apr 2008
    Location
    Brighton, ON, Canada
    Posts
    89
    Rep Power
    7

    Default

    Ok. I have been playing around and have modified this line of my /var/named/db.mydomain.com file:

    Code:
    IN      MX      10 mailserv.mydomain.com
    to:

    Code:
     IN      MX      10 mailserv
    This seems to work better. How can I tell if this is working for sure? I can do an nslookup on both the fake domain and external domains, and dig commands now show (what I think is) properly:

    Code:
    user@mailserv:~$sudo dig +short mydomain.com mx
    10 mailserv.mydomain.com

  3. #3
    strafford is offline Loyal Member
    Join Date
    Apr 2008
    Location
    Brighton, ON, Canada
    Posts
    89
    Rep Power
    7

    Default

    When logged in to the Admin GUI, I click on 'Check MX Record' for my server and get this error:

    Failed to retrieve MX records for domain mailserv.rci.ca

  4. #4
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,506
    Rep Power
    57

    Default

    You're missing some vital information from the DNS config files, there's a period "." missing from some of the lines hence the 'double domain name'.

    The following lines:

    Code:
            IN      MX      10 mailserv.mydomain.com
    mailserv        IN      A       192.168.7.101
    should look like this:

    Code:
    mydomain.com.        IN      MX      10 mailserv.mydomain.com.
    mailserv.mydomain.com.        IN      A       192.168.7.101
    Note the addition of the period at the end of each instance of the domain name. The configuration of a Split DNS is detailed in the wiki article.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Have the zone file like
    Code:
            IN      MX      10 mailserv
    mailserv        IN      A       192.168.7.101
    if completely fine as it will use the domain name from the zone to complete each short name. Lets start from the top again and see what is happening
    Code:
    cat /etc/hosts
    cat /etc/resolv.conf
    dig +short yourdomain mx
    dig +short yourdomain any
    host `hostname` <- note backticks and not singles quote
    Would you also please post your named.conf and zonefiles again.

  6. #6
    strafford is offline Loyal Member
    Join Date
    Apr 2008
    Location
    Brighton, ON, Canada
    Posts
    89
    Rep Power
    7

    Default

    Both seem equally correct solutions. However, neither allows the host command to work:
    Code:
    rci@mailserv:~$ host `hostname`
    Host mailserv not found: 3(NXDOMAIN)
    Code:
    rci@mailserv:~$ cat /etc/hosts
    127.0.0.1       localhost.localdomain localhost
    192.168.7.101   mailserv.mydomain.com mailserv
    
    rci@mailserv:~$ cat /etc/resolv.conf
    nameserver 192.168.7.101
    
    rci@mailserv:~$ dig +short mydomain.com mx
    10 mailserv.mydomain.com.
    
    rci@mailserv:~$ dig +short mydomain.com any
    mydomain.com. scott.mydomain.com. 70732 604800 86400 2419200 604800
    192.168.7.101.mydomain.com.
    192.168.7.101
    10 mailserv.mydomain.com.
    Zone file:
    Code:
    ;
    ; BIND data file for mydomain.com
    ;
    $TTL    604800
    @       IN      SOA     mydomain.com. scott.mydomain.com. (
                             070732         ; Serial
                             604800         ; Refresh
                              86400         ; Retry
                            2419200         ; Expire
                             604800 )       ; Negative Cache TTL
    ;
    @       IN      NS      192.168.7.101
            IN      A       192.168.7.101
            IN      MX      10 mailserv
    mailserv        IN      A       192.168.7.101
    named.conf.options:
    Code:
    options {
            auth-nxdomain no;    # conform to RFC1035
            query-source address * port 53;
            directory "/var/named";
            dump-file "/var/named/data/cache_dump.db";
            statistics-file "/var/named/data/named_stats.txt";
            forwarders { 24.226.1.93; 24.226.10.193; };
    };
    include "/etc/bind/rndc.key";
    zone "mydomain.com" {
            type master;
            file "/var/named/db.mydomain.com";
    };

  7. #7
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Add this to /etc/resolv.conf
    Code:
    search mydomain.com

  8. #8
    strafford is offline Loyal Member
    Join Date
    Apr 2008
    Location
    Brighton, ON, Canada
    Posts
    89
    Rep Power
    7

    Default

    Great. That did it. Thanks!

  9. #9
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    If all is working okay now; please mark the thread as Solved

  10. #10
    strafford is offline Loyal Member
    Join Date
    Apr 2008
    Location
    Brighton, ON, Canada
    Posts
    89
    Rep Power
    7

    Default

    Done. I have also posted my setup in this post if anyone is trying to install on Ubuntu 8.04 and is having trouble.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Zimbra split dns setup on windows domain
    By kwelipatton in forum Installation
    Replies: 3
    Last Post: 10-20-2009, 09:37 AM
  2. [SOLVED] Split DNS - Firewall - Loops back to myself
    By ldoran@goccs.com in forum Installation
    Replies: 9
    Last Post: 09-30-2009, 09:26 AM
  3. Replies: 5
    Last Post: 08-28-2009, 09:35 AM
  4. Split DNS / CentOS 5 / x64
    By powrrrplay in forum Installation
    Replies: 10
    Last Post: 08-27-2009, 08:22 AM
  5. Replies: 20
    Last Post: 03-18-2008, 05:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •