Results 1 to 6 of 6

Thread: CentOS DNS Dummy

  1. #1
    Join Date
    Mar 2007
    Posts
    5
    Rep Power
    8

    Default CentOS DNS Dummy

    I have read over everything on setting up DNS properly for hosting your own mail server behind NAT but I just can't get it straight. So sorry if what I am missing is obvious but I can receive email. When I try to send something to my domain I get back:

    <
    Code:
    allan@wilsonss.com>: Host or domain name not found. Name service error for
       name=mail.wilsonss.com type=A: Host not found
    
    Final-Recipient: rfc822; allan@wilsonss.com
    Action: failed
    Status: 5.0.0
    Diagnostic-Code: X-Postfix; Host or domain name not found. Name service error
       for name=mail.wilsonss.com type=A: Host not found
    I want mail to be deliverable to username@wilsonss.com and outgoing mail works fine. I have setup DNS on this server and here is what I get if I check my entries with dig:

    Code:
    [root@mail named]# dig mx wilsonss.com
    
    ; <<>> DiG 9.2.4 <<>> mx wilsonss.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55229
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;wilsonss.com.                  IN      MX
    
    ;; ANSWER SECTION:
    wilsonss.com .           38400   IN      MX      10 mail.wilsonss.com.
    
    ;; AUTHORITY SECTION:
    wilsonss.com.           38400   IN      NS      192.168.0.3.wilsonss.com.
    
    ;; Query time: 1 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Sun Mar  4 11:42:32 2007
    ;; MSG SIZE  rcvd: 77
    Here is what I have in named.conf(this is just the last section, there is more in the file):

    Code:
    [root@mail named]# more /etc/named.conf
    zone "wilsonss.com" {
    type master;
    file "/var/named/wilsonss.com.hosts";
    };
    Here is what is in my wilsonss.com.hosts file:

    Code:
    [root@mail named]# more wilsonss.com.hosts
    $ttl 38400
    @ IN SOA mail.wilsonss.com. root.mail.wilsonss.com. (
    2006110200
    10800
    3600
    604800
    38400 )
    @ IN NS 192.168.0.3
    @ IN MX 10 mail.wilsonss.com.
    @ IN A 192.168.0.3
    I put an entry in to my hosts file:

    Code:
    192.168.0.3     mail.wilsonss.com    mail
    And here is what I have in resolv.conf(.3 is mail server and .1 is router)
    Code:
    nameserver 192.168.0.3
    nameserver 192.168.0.1
    I am hosting the domain name with godaddy and set the mx record on their dns server to point to my routers public ip address. I know I am missing something obvious but I can't figure it out. Thanks for any help.

    Allan

  2. #2
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    14

    Default

    SO you've got an MX record for wilsonss.com (mail.wilsonss.com) but there's no A record for mail.wilsonss.com (that entry in your hosts file doesn't count)

    you need to add

    mail IN A 192.168.0.3

    (You can test this with host -t A mail.wilsonss.com - when it comes back with an answer, you're done).
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    Join Date
    Mar 2007
    Posts
    5
    Rep Power
    8

    Default

    That got it, thanks for the quick reply.

    Allan

  4. #4
    Join Date
    Mar 2007
    Posts
    24
    Rep Power
    8

    Default Where did you add the entry?

    Did you add it in your wilsonss.com.hosts file?

  5. #5
    Join Date
    Mar 2007
    Posts
    5
    Rep Power
    8

    Default

    I added this line to wilsonss.com.hosts:

    mail IN A 192.168.0.3

    and this fixed it.

    Allan

  6. #6
    Join Date
    Mar 2007
    Posts
    24
    Rep Power
    8

    Default thanks

    that did the trick. I appreciate it, thanks.

Similar Threads

  1. DNS Problem on CentOS
    By nabbed in forum Installation
    Replies: 7
    Last Post: 06-18-2007, 07:42 AM
  2. DNS in a nutshell part two (For dummies)
    By daimer77 in forum Installation
    Replies: 4
    Last Post: 12-18-2006, 06:28 PM
  3. centos 4.4 DNS setting completely method.
    By nxzwt in forum Administrators
    Replies: 2
    Last Post: 11-05-2006, 06:19 AM
  4. DNS Strategies and Best Practices, and a SLES10 Request
    By LMStone in forum Administrators
    Replies: 4
    Last Post: 10-14-2006, 08:51 AM
  5. Zimbra startup hangs after install CentOS 4.2
    By eger in forum Installation
    Replies: 4
    Last Post: 02-10-2006, 11:08 PM

Posting Permissions

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