• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

named slightly mis-configured?

I've got a primary and secondary named servers running and they are properly directing traffic to the appropriate machine resources but when I perform a "nslookup tsunamitech.com" (my domain) I get the following:

Server:  spanky.tsunamitech.com
Address:  0.0.0.0

*** spanky.tsunamitech.com can't find tsunamitech.com: Non-existent host/domain

any ideas anyone?  I think this is holding me back from implementing sendmail since sendmail isn't able to resolve the domain.
0
daveko
Asked:
daveko
  • 5
  • 4
  • 2
  • +3
1 Solution
 
mcdoncCommented:
If sendmail's what's holding you up, add an MX resource record to the tsunamitech.com zone file you've made on the primary name server.  The MX record will point to the machine which should accept mail for your domain.

All following examples are for BIND v4.9, differs for BIND 8.

for example, in the file /var/named/pz/tsunamitech.com:

                                       MX     10  mail.tsunamitech.com. ; primary mail server

The domain itself should not resolve via nslookup unless you've made an entry in your primary's zone file for tsunamitech.com  that looks something like this:

tsunamitech.com.         A          [machines.ip.address.here]  

or

tsunamitech.com          CNAME  [machines.domain.name.here]

For example, let's say you have 2 hosts in the tsunamitech.com domain, one named www.tsunamitech.com, and one named mail.tsunamitech.com...  www.tsunamitech.com is 192.168.1.1, mail.tsunamitech.com is 192.168.1.2.  You might set up your zone file for tsunamitech.com that resolves both addresses and sends mail to mail.tsunamitech.com:

                                    MX    10   mail.tsunamitech.com.
mail                             A    192.168.1.2
www                            A   192.168.1.1

or... you might want to set up a zone file that resolves both, sends mail to mail.tsunamitech.com, AND resolves the name tsunamitech.com   to www.tsunamitech.com:

                                   MX   10   mail.tsunamitech.com
mail                            A   192.168.1.2
www                           A   192.168.1.1
tsunamitech.com.    CNAME www.tsunamitech.com.

Get it?

In any case, the MX record is your friend.
0
 
davekoAuthor Commented:
Problem is that I already have the MX record.  Here's my entry in my db.tsunamitech file.  This has been in there ever since setup my name servers.

;
; Mail server
;
tsunamitech.com.                IN      MX      100     mail.tsunamitech.com.  
0
 
mcdoncCommented:
Daveko,

OK.  You're not using standard vanilla notation for your resource records, and without seeing the entirety of the db.tsunamitech and without knowing your version of BIND, I'm really kind of guessing here.  But here's a demonstration of a working BIND 4.9 "db.tsunamitech" implementation that WILL return an IP address when you look up tsunamitech.com:

--start --
@ IN SOA ns.tsunamitech.com. hostmaster.tsunamitech.com. (
                                                              1998121401      ; serial
                                                              28800           ; refresh, seconds
                                                              7200            ; retry, seconds
                                                              604800          ; expire, seconds
                                                              86400 )         ; minimum, seconds
          NS ns.tsunamitech.com. ; (bogus name, use your first nameserver's)
          NS ns2.tsunamitech.com. ; (bogus name, use your second nameserver's).
          MX 100 mail.tsunamitech.com.
mail   A 10.1.1.1; bogus IP use your mailserver's
www  A  10.1.1.2; bogus IP use your webserver's.
ns       A 10.1.1.3; bogus IP, use your first nameserver's
ns2    A 10.1.1.4; bogus IP use your second nameserver's
tsunamitech.com. CNAME mail.tsunamitech.com.
-- end --

In the above example, we've defined the address mail.tsunamitech.com to map to 10.1.1.1.  On another line, we've mapped the address tsunamitech.com to mail.tsunamitech.com via the use of a CNAME directive.  On yet another, we've given the domain an MX record for which it can look for mail.  In a simple domain (which I assume yours is), this works fine.  There's no need to define MX records for each host, which I think you're trying to do by what you posted last.

nslookup ns.tsunamitech.com will return 10.1.1.3
nslookup ns2.tsunamitech.com will return 10.1.1.4
nslookup tsunamitech.com will return mail.tsunamitech.com and also 10.1.1.1

mail going to the tsunamitech.com domain will be routed to mail.tsunamitech.com

Is this making any sense?

Why don't you post your whole zone file and we'll see if we can find out what the problem is?



0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
marcelofrCommented:
What's in your /etc/resolv.conf? You should find something like:

domain tsunamitech.com
nameserver 127.0.0.1

You can add up to 3 nameserver entries... This file is used by the resolver, that is the library call that resolve names...

Good luck
0
 
hnminhCommented:
Yes, follow marcelofr's comment. You also have to check the host file and your dns's database file of the domain tsunamitech.com to see if there're any spelling mistake. One more thing is the host.conf to see the order of service you use for host name resolving, it's usally:

multi on
host, dns, nis
etc. ...

Sorry if I'm wrong in syntax of lines of host.conf file, but it must be something similar.
Good luck.
0
 
antheaCommented:
do you configure ur reverse for the primary & secondary ?

0
 
irpCommented:
please post /etc/named.boot or /etc/named.conf (version dependant). Also check if named is running (ps ax | grep named)
0
 
davekoAuthor Commented:
running bind 4.9.6 and here's my named.boot file:

primary      tsunamitech.com       /etc/db.tsunamitech
primary      66.63.206.in-addr.arpa  /etc/db.206.63.66
primary      0.0.127.in-addr.arpa      /etc/db.127.0.0

cache      .                  /etc/db.cache

my db.tsunamitech file is as follows:
tsunamitech.com.      IN SOA spanky.tsunamitech.com. daveko.tsunamitech.com. (
                        1      ; Serial
                        10800      ; Refresh after 3 hours
                        3600      ; Retry after 1 hour
                        604800      ; Expire after 1 week
                        86400 )      ; Minimum TTL of 1 day
;
; Name servers
;
tsunamitech.com.      IN NS      nwnexus.wa.com
tsunamitech.com.      IN NS      nwfocus.wa.com
;
; Addresses for the canonical names
;
localhost.tsunamitech.com.      IN      A      127.0.0.1
farkus.tsunamitech.com.            IN      A       206.63.66.11
scorcher.tsunamitech.com.      IN      A       206.63.66.12
citron.tsunamitech.com.            IN      A      206.63.66.13
spanky.tsunamitech.com.            IN      A       206.63.66.14
valkyrie.tsunamitech.com.      IN      A      206.63.66.15
;
; Aliases
;
www.tsunamitech.com.            IN      CNAME      valkyrie.tsunamitech.com.
news.tsunamitech.com.            IN      CNAME      valkyrie.tsunamitech.com.
mail.tsunamitech.com.            IN      CNAME      valkyrie.tsunamitech.com.
ftp.tsunamitech.com.            IN      CNAME      valkyrie.tsunamitech.com.
;
; Mail server
;
tsunamitech.com.              IN      MX      100     mail.tsunamitech.com.


0
 
irpCommented:
I really think I deserve more than 150 points for this (if it's right that is), anyway, here goes.

This should be how a named.boot looks (move your databases to /var/named)

directory /var/named

; type           domain                source host/file          


primary         tsunamitech.com          db.tsunamitech.com
primary         66.63.206.in-addr.arpa   db.206.63.66
primary         0.0.127.in-addr.arpa     db.127.0.0
primary         .                        db.cache

Your db.tsunamitech.com should look a bit like :

tsunamitech.com. IN SOA spanky.tsunamitech.com. daveko.tsunamitech.com. (
1 ; Serial
10800 ; Refresh after 3 hours
3600 ; Retry after 1 hour
604800 ; Expire after 1 week
86400 ) ; Minimum TTL of 1 day
;
; Name servers
;
                 IN NS nwnexus.wa.com.
                 IN NS nwfocus.wa.com.
;
; Addresses for the canonical names
;
localhost  IN      A       127.0.0.1
farkus     IN      A       206.63.66.11
scorcher   IN      A       206.63.66.12
citron     IN      A       206.63.66.13
spanky     IN      A       206.63.66.14
valkyrie   IN      A       206.63.66.15
;
; Aliases
;
www        IN      CNAME  valkyrie
news       IN      CNAME  valkyrie
mail       IN      CNAME  valkyrie
ftp        IN      CNAME  valkyrie
;
; Mail server
;
          IN      MX      100     mail

If all goes well, check reverse lookups as well, post another question about those if you need.
Hope this all helps.
0
 
mcdoncCommented:
OK, we know you have BIND 4.9, that's good.  OK, whats the problem now?  You can't do an nslookup on tsunamitech.com?  And Sendmail doesn't work?

If all you want to do is make your mail work, just follow the steps in #1 below, ignore #2:

1)  Sendmail doesn't work?  Reason:  You do not have a working MX record.  The MX record line in "db.tsunamitech" won't provide hostname lookup for "tsunamitech.com", and it won't act as a properly-set up mail exchanger directive, actually I don't know what it'll do. It's totally wrong, you do not map a host to an IP address on a MX record line.  Replace it with:  "                   IN MX 100 mail.tsunamitech.com" (note the lack of hostname).   Please refer to the examples I've provided within the first rejected answer message in this thread in order to do so.

2)  You can't do a lookup on "tsunamitech.com"?  Reason:  You'll need to add another A or CNAME record if you want to map the DNS name tsunamitech.com to an IP address.  This is not required to make mail function.  It has nothing to do with mail whatsoever, except for *old*,  *ancient* versions of Sendmail.  It would be useful, for instance, in the case that someone types in "http://tsunamitech.com" in his or her web browser.  If you want to do it, just put "tsunamitech.com. IN A [ip address]" somwhere in the db.tsunamitech file.

Please take the recommended steps and post your results when possible.

Thanks,

Chris

0
 
mcdoncCommented:
Wow, totally harshed-on by irp.
0
 
davekoAuthor Commented:
OK.  I replaced my named.boot and db.tsunamitech with your files and now I get this message when named starts up:

Jan  4 12:41:11 spanky named[9711]: ftp.tsunamitech.com has CNAME and other data (invalid)

Any ideas?
0
 
davekoAuthor Commented:
OK.  I'll take that answer.  It wasn't *entirely* correct tho as my comment containing the error message shows.  I futzed around with some more stuff and combined your answer with some info in the DNS 4.x HowTo and finally got my damn sendmail to actually send mail!  How bout that!  =)  I'm happy now.

I had to move the MX record up with the NS records and change things around.  I kept my named.boot as it was.  (another problem in that the change of my cache to primary was causing it to choke)  It also didn't seem to like me declaring a mail server name that was an alias either so I changed a couple names.  Here's my new db.tsunamitech file:

tsunamitech.com. IN SOA spanky.tsunamitech.com. daveko.tsunamitech.com. (
      1 ; Serial
      10800 ; Refresh after 3 hours
      3600 ; Retry after 1 hour
      604800 ; Expire after 1 week
      86400 ) ; Minimum TTL of 1 day
;
; Name servers
;
                NS nwnexus.wa.com.
                NS nwfocus.wa.com.
            MX      10 mail
;
; Addresses for the canonical names
;
localhost      A       127.0.0.1
farkus            A       206.63.66.11
scorcher      A       206.63.66.12
citron            A       206.63.66.13
spanky            A       206.63.66.14
mail            A       206.63.66.15
;
; Aliases
;
www        IN      CNAME  mail
news       IN      CNAME  mail
ftp        IN      CNAME  mail

Thanks everyone.  I appreciate all the comments and help.  Now... if anyone wants to help me set up a POP3 or IMAP mail server application, email me at daveko@tsunamitech.com. =P

Thanks again!
0
 
mcdoncCommented:
Wow, at least 1 hour of my life wasted.  Sad.  You're welcome.
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 5
  • 4
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now