Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-09-2010, 11:33 AM
Loyal Member
 
Posts: 85
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
Reply With Quote
  #2 (permalink)  
Old 04-09-2010, 01:44 PM
Loyal Member
 
Posts: 85
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
Reply With Quote
  #3 (permalink)  
Old 04-09-2010, 01:58 PM
Loyal Member
 
Posts: 85
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
Reply With Quote
  #4 (permalink)  
Old 04-09-2010, 11:18 PM
Zimbra Consultant & Moderator
 
Posts: 20,313
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
Reply With Quote
  #5 (permalink)  
Old 04-09-2010, 11:59 PM
Moderator
 
Posts: 7,928
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.
__________________
Reply With Quote
  #6 (permalink)  
Old 04-12-2010, 06:35 AM
Loyal Member
 
Posts: 85
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";
};
Reply With Quote
  #7 (permalink)  
Old 04-12-2010, 06:38 AM
Moderator
 
Posts: 7,928
Default

Add this to /etc/resolv.conf
Code:
search mydomain.com
__________________
Reply With Quote
  #8 (permalink)  
Old 04-12-2010, 06:44 AM
Loyal Member
 
Posts: 85
Default

Great. That did it. Thanks!
Reply With Quote
  #9 (permalink)  
Old 04-12-2010, 06:45 AM
Moderator
 
Posts: 7,928
Default

If all is working okay now; please mark the thread as Solved
__________________
Reply With Quote
  #10 (permalink)  
Old 04-12-2010, 06:48 AM
Loyal Member
 
Posts: 85
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.