iT邦幫忙

0

yahoo信箱寄信會被退,顯示NO MX records

退信內容
Sorry, we were unable to deliver your message to the following address.
xxxxxxxxxxx@XXXX.com.tw:
No MX records for XXXX.com.tw

yahoo一直被退信,gmail就沒問題請問yahoo的MX records是什麼?跟公司的DNS有關嗎?

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中
0
yesongow
iT邦大師 1 級 ‧ 2017-05-21 00:08:54
最佳解答

打電話給客戶,請客戶找該公司的MIS,增加MX Record呀!

c:\nslookup

server dns.hinet.net
set type=MX
gmail.com
bot.com.tw
XXXXX.com.tw
exit

你可以觀察一下,上面三個domain,若是輸入gmail.com,應該會出現MX資料
而輸入bot.com.tw,卻沒有
當然,你也可以輸入你客戶的Domain囉!

好的,我再試試

2
cmwang
iT邦大師 1 級 ‧ 2017-05-19 15:42:33

依據RFC2821的規範,mail server要寄信到特定domain的話會先透過DNS查詢有沒有MX RR,若有MX RR就再查詢其MX有無A RR,若有就往該IP address送,若沒有MX RR但有A RR則往A RR的IP address送,下圖中的3p.club.tw只有MX RR,而其MX也有A RR,所以xxx@3p.club.tw的mail最後會往60.251.148.121送,但w3.3p.club.tw只有A RR而沒有MX RR,若Yahoo在寄mail給xxx@w3.3p.club.tw時只看MX RR而忽略A RR時可能就會發生您說的狀況,只是您沒有說明XXXX.com.tw到底為何,所以鵝也只能瞎猜了/images/emoticon/emoticon21.gif
http://ithelp.ithome.com.tw/upload/images/20170519/20004868QU36bg6n7A.png

XXXX.com.tw是公司的內送與外寄郵件伺服器

cmwang iT邦大師 1 級 ‧ 2017-05-19 20:30:31 檢舉

鵝的意思是鵝不知道貴公司真正的domain name,自然看不到貴公司的DNS長怎樣啊,如果貴公司的DNS長的就像鵝寫的3p.club.tw那樣,那Yahoo因為只有A RR而沒有MX RR寄不過來的話,也只能說Yahoo沒有依照RFC2821/5321的要求來實作(i.e. Yahoo沒有完全按照業界標準)所造成的而已/images/emoticon/emoticon21.gif....

了解,禮拜一上班我再試試

0
bizpro
iT邦大師 1 級 ‧ 2017-05-19 15:51:22

No MX records for XXXX.com.tw

SMTP是不管MX的, MX是給POP3/IMAP用的. 因此對於SMTP(寄信)來說, 不需要知道MX紀錄的, 一般沒有SMTP會去管收件者是否有正確的MX紀錄, 很奇怪的是, Yahoo!會去檢查MX紀錄, 可能是因為被Aabaco Small Business買走的關係吧?

20170519T1618修正:
SMTP可以不管MX紀錄的

看更多先前的回應...收起先前的回應...
cmwang iT邦大師 1 級 ‧ 2017-05-19 16:14:18 檢舉

R U sure?? SMTP server就是根據MX決定mail routing的,而一般MUA怎麼連上mail server跟MX RR也沒關係吧....

bizpro iT邦大師 1 級 ‧ 2017-05-19 16:21:59 檢舉

請看implicit MX:
https://tools.ietf.org/html/rfc5321#section-5
If an empty list of MXs is returned,the address is treated as if it was associated with an implicit MX RR, with a preference of 0, pointing to that host.
應該修正為:
SMTP可以不管MX紀錄. 這也是為什麼Gmail和其他Email Server會正確收信. TCP/IP應該是中性的, 不需知道應用服務. 而MX是一種應用服務. 所以現代Email Server採用Implicit MX.

cmwang iT邦大師 1 級 ‧ 2017-05-19 16:30:58 檢舉

http://ithelp.ithome.com.tw/upload/images/20170519/200048684D3SdHCrML.png可是根據RFC的要求,mail routing是以MX RR為主,A RR只應該在沒有MX RR時才可以被拿來當成MX的代用品啊....
/images/emoticon/emoticon16.gif

cmwang iT邦大師 1 級 ‧ 2017-05-19 16:53:44 檢舉

請看RFC2821的原文,只要有MX RR的話SMTP server是不可以先查詢A RR的,所以爭論說是不是一定要有MX RR才收得到mail其實沒啥意義就是了....BTW,鵝剛試著從Yahoo寄mail到xxx@w3.3p.club.tw會收到No MX RR的退信,而xxx@3p.club.tw是正常的,可見Yahoo的確是忽略掉了只要有A RR也可以寄信這點了....

The lookup first attempts to locate an MX
record associated with the name. If a CNAME record is found instead,
the resulting name is processed as if it were the initial name. If
no MX records are found, but an A RR is found, the A RR is treated as
if it was associated with an implicit MX RR, with a preference of 0,
pointing to that host. If one or more MX RRs are found for a given
name, SMTP systems MUST NOT utilize any A RRs associated with that
name unless they are located using the MX RRs; the "implicit MX" rule
above applies only if there are no MX records present.

bizpro iT邦大師 1 級 ‧ 2017-05-19 16:54:35 檢舉

Gmail可以寄到. 因為Implicit MX, 我只是解釋為什麼Gmail寄到而Yahoo!會錯誤. 但實務上, 都會設MX.

bizpro iT邦大師 1 級 ‧ 2017-05-19 16:59:21 檢舉

證明了Yahoo!並未遵循RFC 2821.

寫得好複雜,所以有解決的方法嗎?謝謝回覆!

bizpro iT邦大師 1 級 ‧ 2017-05-19 19:17:47 檢舉

加上MX紀錄啊

bizpro iT邦大師 1 級 ‧ 2017-05-19 20:15:32 檢舉

就是因為複雜, 我通常都跟客戶說SMTP發生錯誤時不需看MX紀錄. 但您的案例是Yahoo!處理MX紀錄的問題, 這種幾乎不會發生的問題發生了.

bizpro iT邦大師 1 級 ‧ 2017-05-19 20:20:59 檢舉

(刪除混淆的例子)

cmwang iT邦大師 1 級 ‧ 2017-05-19 20:39:05 檢舉

implicit MX是指只有A RR時,SMTP server會把A RR視為priority為0的MX,直接把mail往那個IP送,應該不是您所說的意思吧/images/emoticon/emoticon19.gif....

bizpro iT邦大師 1 級 ‧ 2017-05-19 23:46:06 檢舉

在RFC 5321中的確是這樣說:If an empty list of MXs is returned,the address is treated as if it was associated with an implicit MX RR, with a preference of 0, pointing to that host.
那是指如果找不到MX紀錄的情況之下.

MX的確是用在SMTP收信, 而正常的Email Server一定會設MX紀錄, 只是沒有MX不會有問題.

我要發表回答

立即登入回答