简体   繁体   中英

server can't find IP address NXDOMAIN

I am trying to set up SMTP mail on CentOS / WHM, so far without success. Each message gets frozen in the mail queue with the error '@Diagnostic-Code: smtp; 550-Sender has no A, AAAA, or MX DNS records.' The problem appears to be with my hostname.

I understand from other answers that I need to configure reverse DNS for SMTP to work, because the receiving mail server will reject mail if it comes from an IP without a reverse DNS - so I've added a reverse DNS zone for my hostname. But this has not helped (and don't see why having no reverse DNS would cause the 550 error I am getting anyway).

In named.conf:

controls {
        inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
};

options {
    /* make named use port 53 for the source of all queries, to allow
         * firewalls to block all ports except 53:
         */

    // query-source    port 53;

    recursion no;

    /* We no longer enable this by default as the dns posion exploit
        has forced many providers to open up their firewalls a bit */

    // Put files that named is allowed to write in the data/ directory:
    directory                "/var/named"; // the default
    pid-file                 "/var/run/named/named.pid";
    dump-file                "data/cache_dump.db";
    statistics-file          "data/named_stats.txt";
   /* memstatistics-file     "data/named_mem_stats.txt"; */
    allow-transfer    { "none"; };
};


zone "whm.nantinet-c36.co.uk" {
        type master;
        file "/var/named/whm.nantinet-c36.co.uk.db";
};

zone "8.68.77.in-addr.arpa" {
        type master;
        file "/var/named/8.68.77.in-addr.arpa.db";
};

This is the zone file for nantinet-c36.co.uk:

whm.nantinet-c36.co.uk. 86400   IN      SOA     ns1.livedns.co.uk.      my.email.co.uk. (
                                                2017012706 ;Serial Number
                                                3600 ;refresh
                                                7200 ;retry
                                                1209600 ;expire
                                                86400 ;minimum
        )
whm.nantinet-c36.co.uk. 86400   IN      NS      ns1.livedns.co.uk.
whm.nantinet-c36.co.uk. 86400   IN      NS      ns2.livedns.co.uk.
whm.nantinet-c36.co.uk. 14400   IN      A       77.68.8.55
whm.nantinet-c36.co.uk. 14400   IN      MX      0       whm.nantinet-c36.co.uk.
mail    14400   IN      CNAME   whm.nantinet-c36.co.uk.
www     14400   IN      CNAME   whm.nantinet-c36.co.uk.
ftp     14400   IN      CNAME   whm.nantinet-c36.co.uk.

This is the zone file for the reverse dns entry:

8.68.77.in-addr.arpa.   86400   IN      SOA     ns1.livedns.co.uk.      my.email.co.uk. (
                                                2017020204 ;Serial Number
                                                3600 ;refresh
                                                7200 ;retry
                                                1209600 ;expire
                                                86400 ;minimum
        )
8.68.77.in-addr.arpa.   86400   IN      NS      ns1.livedns.co.uk.
8.68.77.in-addr.arpa.   86400   IN      NS      ns2.livedns.co.uk.
8.68.77.in-addr.arpa.   14400   IN      A       77.68.8.55
8.68.77.in-addr.arpa.   14400   IN      MX      0       8.68.77.in-addr.arpa.
8.68.77.in-addr.arpa.   14400   IN      PTR     nantinet-c36.co.uk.
8.68.77.in-addr.arpa.   14400   IN      PTR     whm.nantinet-c36.co.uk.

The nameservers work, I have an accessible web site running on the server. I am puzzled by this: if I dig +nssearch 8.68.77.in-addr.arpa, I get the error 'no servers could be reached'

Is there an error in my dns setup, or am I doing something else wrong here? Thanks.

Yes, there is a problem with your DNS setup. The parent of whm.nantinet-c36.co.uk does not know about it, so it can't delegate to it, so nobody can look up any information about it. You can see a test of this here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM