2014年10月1日 星期三

退信通知 Mail Hostname cannot be resolved

退信通知 Mail Hostname cannot be resolved

轉載至 http://ithelp.ithome.com.tw/question/10094722

Hi. This is the qmail-send program at yahoo.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<peter.huang@inhon.com>:
Sorry, I couldn't find any host named inhon.com. (#5.1.2)

這個問題該怎麼解決
-----Original Message-----
From: Mail Deliver System [mailto:MAILER-DAEMON]
Sent: 無
To: jander@wipo.com.tw
Subject: Returned Mail: Hostname cannot be resolved

The original message was received at Fri, 13 Jul 2012 15:55:24 +0800 (CST)
from jander@wipo.com.tw

---The following addresses had delivery errors---

Danny.Lin@inhon.com [Hostname cannot be resolved]
XiangChi.Lee@inhon.com [Hostname cannot be resolved]
====================================================================

首先, 那是qmail, 開頭是Q, 不是gmail的G.
而qmail是一個yahoo! mail的MTA, 在linux之下有三大MTA: sendmail, postfix, 和qmail

(1)挖看看inhon.com的DNS MX紀錄:
$ dig inhon.com mx

; <<>> DiG 9.8.1-P1 <<>> inhon.com mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45068
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;inhon.com. IN MX

;; ANSWER SECTION:
inhon.com. 3600 IN MX 15 mail.inhon.com.
inhon.com. 3600 IN MX 10 server.inhon.com.

;; Query time: 30 msec
;; SERVER: 168.95.1.1#53(168.95.1.1)
;; WHEN: Fri Jul 6 22:20:17 2012
;; MSG SIZE rcvd: 71

正常的. 

(2)再挖MX 10的:
$ dig server.inhon.com

; <<>> DiG 9.8.1-P1 <<>> server.inhon.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 56432
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;server.inhon.com. IN A

;; AUTHORITY SECTION:
inhon.com. 1365 IN SOA inhon-ad.inhon.local. hostmaster.inhon.local. 25 900 600 86400 3600

;; Query time: 22 msec
;; SERVER: 168.95.1.1#53(168.95.1.1)
;; WHEN: Fri Jul 6 22:33:36 2012
;; MSG SIZE rcvd: 101

錯了, 沒有找到A紀錄

(3)繼續挖MX 15的:
$ dig mail.inhon.com

; <<>> DiG 9.8.1-P1 <<>> mail.inhon.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13528
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;mail.inhon.com. IN A

;; ANSWER SECTION:
mail.inhon.com. 3600 IN CNAME server.inhon.com.
server.inhon.com. 3600 IN A 113.196.52.131

錯了, MX紀錄不該指向CNAME

qmail會寄信失敗是因為inhon.com的DNS MX紀錄錯了, 而qmail是這三大MTA中最嚴謹的, 混不過去的.
既然只有一個Server, 那就只要設一個MX紀錄, 並指向A紀錄的IP位址.


沒有留言:

張貼留言