Board logo

標題: [KnowHow]Sendmail Q信問題, 與DNS查詢有關(客戶的問題做經驗分享) [打印本頁]

作者: tptc    時間: 2006-9-8 19:04     標題: [KnowHow]Sendmail Q信問題, 與DNS查詢有關(客戶的問題做經驗分享)

問題:
漢磊的MailSherlock中的Sendmail對某個Domain的信件總是寄不過去,Sendmail Queue信的訊息如下:

"host map: lookup (domain): deferred" "Transient parse error"

從Google中查到,這與Sendmail查詢DNS的方式有關:文章分享如下:

"host map: lookup (domain): deferred". This Sendmail error--also seen as "Transient parse error -- message queued
for future delivery" or "Name server: domain: hostnot found"--indicates that Sendmail encountered a problem with
one of its DNS resource record lookups of the destination domain.

Starting with Sendmail 8.12, Sendmail queries the following 3 DNS resource records in order:
AAAA (IPv6 address records; not applicable if you compiled Sendmail without IPv6 support)
A
MX


The proper name server response for a resource record for which it is authoritative but has no data would be "NOERROR"
with an empty answer section as seen below:

Example:

dig good_domain aaaa

; <<>> DiG 9.2.2 <<>> good_domain aaaa
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13014
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0


A misconfigured DNS server may return a "SERVFAIL" or "NXDOMAIN" status:
(一個設定錯誤的DNS Server回答的答案)

Example:

dig bad_domain aaaa

; <<>> DiG 9.2.2 <<>> bad_domain aaaa
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 8416
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

Or:

dig bad_domain aaaa

; <<>> DiG 9.2.2 <<>> bad_domain aaaa
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 8416
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0


With Sendmail 8.12.x, you can ignore AAAA "SERVFAIL" or "NXDOMAIN" errors and continue DNS processing with
the following entry in your macro configuration (.mc) file:
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')dnl

對應到Sendmail的設定是:
# vi /etc/mail/sendmail.cf
找到下面這一行,確定沒有被註解
O ResolverOptions=WorkAroundBrokenAAAA
若有修改的話,restart sendmail以生效,sendmail就會忽略dig xxx.xxx aaaa回應的錯誤(對方的DNS server設定有誤)

However, if the A or MX record lookup for the domain returns a "SERVFAIL," Sendmail will queue the message, believing
it has encountered a transient DNS problem. For example, if a domain has a valid A record but returns a "SERVFAIL" when
queried for an MX record (instead of "NOERROR" with an empty answer section), Sendmail will queue the message.
You should contact the remote name server administrator in order to fix these problems.
(所以當發生dns查不到時,要使用dig來檢測,查看其status為何,是SERVFAIL/NXDOMAIN等,看看是否是對方的DNS
主機發生問題)

To watch Sendmail's DNS queries when processing a queued message, use the -d8.8 debug syntax:
sendmail -v -d8.32 -qImessage_ID
作者: service.support    時間: 2008-11-22 16:36     標題: 回復 #1 的帖子

問題:
漢磊的MailSherlock中的Sendmail對某個Domain的信件總是寄不過去,Sendmail Queue信的訊息如下:

"host map: lookup (domain): deferred" "Transient parse error"

從Google中查到,這與Sendmail查詢DNS的方式有關:文章分享如下:

"host map: lookup (domain): deferred". This Sendmail error--also seen as "Transient parse error -- message queued
for future delivery" or "Name server: domain: hostnot found"--indicates that Sendmail encountered a problem with
one of its DNS resource record lookups of the destination domain.

Starting with Sendmail 8.12, Sendmail queries the following 3 DNS resource records in order:
AAAA (IPv6 address records; not applicable if you compiled Sendmail without IPv6 support)
A
MX


The proper name server response for a resource record for which it is authoritative but has no data would be "NOERROR"
with an empty answer section as seen below:

Example:

dig good_domain aaaa

; <<>> DiG 9.2.2 <<>> good_domain aaaa
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13014
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0


A misconfigured DNS server may return a "SERVFAIL" or "NXDOMAIN" status:
(一個設定錯誤的DNS Server回答的答案)

Example:

dig bad_domain aaaa

; <<>> DiG 9.2.2 <<>> bad_domain aaaa
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 8416
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

Or:

dig bad_domain aaaa

; <<>> DiG 9.2.2 <<>> bad_domain aaaa
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 8416
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0


With Sendmail 8.12.x, you can ignore AAAA "SERVFAIL" or "NXDOMAIN" errors and continue DNS processing with
the following entry in your macro configuration (.mc) file:
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')dnl

對應到Sendmail的設定是:
# vi /etc/mail/sendmail.cf
找到下面這一行,確定沒有被註解
O ResolverOptions=WorkAroundBrokenAAAA
若有修改的話,restart sendmail以生效,sendmail就會忽略dig xxx.xxx aaaa回應的錯誤(對方的DNS server設定有誤)

However, if the A or MX record lookup for the domain returns a "SERVFAIL," Sendmail will queue the message, believing
it has encountered a transient DNS problem. For example, if a domain has a valid A record but returns a "SERVFAIL" when
queried for an MX record (instead of "NOERROR" with an empty answer section), Sendmail will queue the message.
You should contact the remote name server administrator in order to fix these problems.
(所以當發生dns查不到時,要使用dig來檢測,查看其status為何,是SERVFAIL/NXDOMAIN等,看看是否是對方的DNS
主機發生問題)

To watch Sendmail's DNS queries when processing a queued message, use the -d8.8 debug syntax:
sendmail -v -d8.32 -qImessage_ID




歡迎光臨 HGIGA Service Docs (http://docs.hgiga.com/Discuz4/) Powered by Discuz! 4.1.0