Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm new to Bind/DNS and want to point/map SMTP, webmail and IMAP to my domain but a check in nslookup is failing. How can I nslookup SMTP this way?

The error I get is: smtp.stylez24.com: NXDOMAIN

In my forward zone file I have this, wich lets me nslookup my domain but not SMTP:

; BIND data file for local loopback interface;
$TTL    604800
@       IN      SOA     server.stylez24.com.     admin.stylez24.com. (
                          2         ; Serial
                     604800         ; Refresh
                      86400         ; Retry
                    2419200         ; Expire
                     604800 )       ; Negative Cache TTL
  ;


   stylez24.com.            IN      NS              stylez24.com.
   stylez24.com.            IN      A               192.168.10.1

   @                       IN      A               127.0.0.1
   @                       IN      AAAA            ::1
   www                     IN      CNAME           stylez24.com.
   smtp                    IN      CNAME           stylez24.com.
   stylez                  IN      A               192.168.10.1
   smtp.stylez24.com       IN      A               192.168.10.2
share|improve this question

1 Answer 1

; BIND data file for local loopback interface;
$TTL    604800
@       IN      SOA     ns.stylez24.com.     admin.stylez24.com. (
                          2         ; Serial
                     604800         ; Refresh
                      86400         ; Retry
                    2419200         ; Expire
                     604800 )       ; Negative Cache TTL
  ;


   @                       IN      NS              stylez24.com.
   @                       IN      A               192.168.10.1
   @                       IN      A               127.0.0.1
   @                       IN      AAAA            ::1

                           IN      A               192.168.10.1
   ns                      IN      A               192.168.10.1
   stylez24.com.           IN      A               192.168.10.1

   www                     IN      CNAME           ns

   stylez                  IN      A               192.168.10.1

   smtp                    IN      A               192.168.10.1
                           IN      MX              10   smtp

   smtp2                   IN      A               192.168.10.2
                           IN      MX              20   smtp2 
share|improve this answer
    
-The error of NXDOMAIN caused because by the definition of domain before the definition of the IP address of domain name. like this: stylez24.com. IN NS stylez24.com. stylez24.com. IN A 192.168.10.1 –  Paulo Maia May 17 at 2:20
    
Didnt work, still get NXDOMAIN with this setting too. Here is my dig smtp ; <<>> DiG 9.9.5-3-Ubuntu <<>> smtp ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 27358 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;smtp. IN A ;; AUTHORITY SECTION: . 533 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2014051700 1800 900 604800 86400 –  Jason May 17 at 8:16
    
-Well take look now, think about it this solved your problem! I performed the test here with this address and domain worked perfectly, take a look around and see if this is entirely correct as it should, anything just tell me. –  Paulo Maia May 17 at 16:50
    
Still not working ,smtp. nxdomain. Could the problem me come from another file ? Thanks for your efforts btw ;) –  Jason May 17 at 20:39
    
Update: I got it to work finally,using one IP: Stylez24 IN A 192.168.10.1 smtp IN CNAME stylez24.com. –  Jason May 18 at 2:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.