【发布时间】:2017-06-20 02:14:54
【问题描述】:
我正在尝试在 CentOS / WHM 上设置 SMTP 邮件,到目前为止没有成功。每条消息都被冻结在邮件队列中,并出现错误'@Diagnostic-Code: smtp; 550-发件人没有 A、AAAA 或 MX DNS 记录。问题似乎与我的主机名有关。
我从其他答案中了解到,我需要为 SMTP 配置反向 DNS 才能工作,因为如果邮件来自没有反向 DNS 的 IP,接收邮件服务器将拒绝邮件 - 所以我为我添加了一个反向 DNS 区域主机名。但这并没有帮助(并且不明白为什么没有反向 DNS 会导致我得到的 550 错误)。
在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";
};
这是 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.
这是反向 dns 条目的区域文件:
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.
域名服务器正常工作,我在服务器上运行了一个可访问的网站。我对此感到困惑:如果我挖掘 +nssearch 8.68.77.in-addr.arpa,我会收到错误“无法访问服务器”
我的 dns 设置是否有错误,或者我在这里做错了什么? 谢谢。
【问题讨论】:
-
我错过了主机名上的 A 记录,所以现在 sendmail 可以工作了。但是当我挖掘 +nssearch 8.68.77.in-addr.arpa 时,我仍然收到“无法访问服务器”错误