iT邦幫忙

0

mail server寄信問題

  • 分享至 

  • twitterImage

各位前輩好
小弟近期幫公司架設一台新的mail server
卻發生一個問題 無法寄信給公司舊的mail server會被退信
但是寄給google yahoo等等各大網站信箱都沒問題
小弟新的mail server是連接到新架設的AD網域控制站 內部DNS位址是192.168.1.5
新的mail sever 位址 192.168.1.4
現在情況是不管我用內部外部DNS 新的mail server都無法寄信給舊mail server,
但是如果從舊的mail server寄給新的mail server是可以通的
以下是我的錯誤log 假設舊公司mail server domain是 p2p.com
Resolving MX record for p2p.com (DNS Server: 192.168.1.5)...
* DNS server reports no valid records for the requested type found
Resolving MX record for p2p.com(DNS Server: 8.8.8.8)...
* DNS: 10 second wait for DNS response exceeded (DNS Server: 8.8.8.8)
Resolving MX record for p2p.com (DNS Server: 192.168.1.1)...
* DNS: 10 second wait for DNS response exceeded (DNS Server: 192.168.1.1)
Attempting SMTP connection to p2p.com
* p2p.com found in internal AAAA lookup black-list
Resolving A record for p2p.com(DNS Server: 192.168.1.5)...
* D=p2p.comTTL=(14) A=[53.229.110.139]
Attempting SMTP connection to 53.229.110.139:25
Waiting for socket connection...
* Connection established 192.168.1.4:50892 --> 53.229.110.139:25
Waiting for protocol to start...
Socket connection closed by the other side (how rude!)
* This message is 60 minutes old; it has 0 minutes left in this queue
Remote queue lifetime exceeded; message placed in retry queue
麻煩各位大神指點一下小弟

看更多先前的討論...收起先前的討論...
我假設如下
A. OLD Mail 內部 IP 是 192.168.1.1 外部 是 59.x.x.1 DN = p2o.com Host = mail
B. New Mail 內部 IP 是 192.168.1.4 外部 是 59.x.x.4 DN = p2p.com Host = mail
C. p2o.com DNS 對內 IP 是 192.168.1.2 對外 IP 是 59.x.x.2
D. p2p.com DNS 對內 IP 是 192.168.1.3 對外 IP 是 59.x.x.3

p2o.com 對外 DNS 記錄如下
@ MX 10 59.x.x.1
@ SOA 59.x.x.2
dns A 59.x.x.2
mail A 59.x.x.1

p2o.com 對內 DNS 記錄如下
@ MX 10 192.168.1.1
@ SOA 192.168.1.2
dns A 192.168.1.2
mail A 192.168.1.1

p2p.com 對外 DNS 記錄如下
@ MX 10 59.x.x.4
@ SOA 59.x.x.3
dns A 59.x.x.3
mail A 59.x.x.4

p2p.com 對內 DNS 記錄如下
@ MX 10 192.168.1.4
@ SOA 192.168.1.3
dns A 192.168.1.3
mail A 192.168.1.4

你的設定要跟上面一樣,才有可能把信發給新舊伺服器
上面的 DNS 對內 對外 需要兩台 主機喔
你不能把他併在一起,以你的環境來說需要有四台 DNS 主機
一般來說,對外的我建議你去申請 DNS HOSTING 來代管
或是你申請 域名 的機構,他應該會有 DNS 代管,( HINET 有 SEEDNET 沒,速博有其他私人的大多有 )你可以用 DNS 代管去設定這些記錄,有郵件主機,DNS 內外分開是很重要的規畫喔
Resolving MX record for p2p.com (DNS Server: 192.168.1.5)...
* DNS server reports no valid records for the requested type found
Resolving MX record for p2p.com(DNS Server: 8.8.8.8)...
* DNS: 10 second wait for DNS response exceeded (DNS Server: 8.8.8.8)
Resolving MX record for p2p.com (DNS Server: 192.168.1.1)...
* DNS: 10 second wait for DNS response exceeded (DNS Server: 192.168.1.1)
這一段已經說了dns 找不到mx記錄啊
後面當然會把找不到記錄的網域列入黑名單啊
Attempting SMTP connection to 53.229.110.139:25
Waiting for socket connection...
* Connection established 192.168.1.4:50892 --> 53.229.110.139:25
Waiting for protocol to start...
Socket connection closed by the other side (how rude!)
* This message is 60 minutes old; it has 0 minutes left in this queue
Remote queue lifetime exceeded; message placed in retry queue

這一段更扯,你憑什麼認為192.168.1.4:50892 --> 53.229.110.139:25
這兩個 ip 可以互連呢,你沒經過 nat 轉換,怎麼可能互相找的到
建議題主回去重修 tcpip概論會比較快
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中
0
ayu
iT邦好手 2 級 ‧ 2015-09-23 08:43:35
最佳解答

新架的mail server(192.168.1.4), 指定的DNS resolver順序為
192.168.1.5 , 8.8.8.8 , 192.168.1.1
192.168.1.5(新架AD), 無法解析得到 p2p.com 的 MX record
8.8.8.8 , 無回應
192.168.1.1 , 無回應

既然都查不到 p2p.com 有效的 MX record,
只好直接試 p2p.com 的 AAAA/A record ,
AAAA record 被判定在黑名單(black-list)裡, 故忽略之;
A record 則找到是 53.229.110.139 , 因此嘗試建立smtp連線
192.168.1.4:50892 --> 53.229.110.139:25
可是被 53.229.110.139 這端打槍(關閉連線無回應訊息)

所以, 你要努力的方向是:

  1. 53.229.110.139 這台為何直接拒絕連線?
    從你先前的發問, 很可能是有做PTR檢查, 直接拒絕無反解的連線來源,
    若真是如此, 強烈建議你取消此檢查, 現在的環境早已不是十幾年前那樣.
    (不少ISP都搞不懂PTR了, 何況更多公司以行政人員兼網管)
    若仍堅持要檢查PTR, 53.229.110.139 使用的DNS recolver又是哪些?
    8.8.8.8 不可能回得出 192.168.*.* 的 PTR , 能理解嗎?

  2. 192.168.1.5 如果要擔任內部DNS server,
    至少得能正確回答 p2p.com 相關設定值(內網觀點),
    很顯然這部份你應該沒有做好!
    還有內網IP的PTR, 甚至IPv6的PTR..等,
    絕對不要以為架完AD就什麼都完成了.
    需要考量的事還不少, 如果您經驗不太夠又無前輩可指導, 不太建議你架內部DNS.
    實務上就真有些公司直接以內網AD域名寄發EDM, 講了也聽不懂 ╮(╯_╰)╭

  3. 192.168.1.4 對外 8.8.8.8 的DNS封包似乎不通,
    是本機防火牆還是路由器那邊擋掉? 請自行測試解決.

  4. 192.168.1.1 如果是路由器, 就不要指定為 DNS resolver 自找麻煩了.

s87080400 iT邦新手 5 級 ‧ 2015-09-27 15:08:38 檢舉

感謝您的分析,學生會試著以您分享的角度去排除

4
wiseguy
iT邦超人 1 級 ‧ 2015-09-19 21:44:26

s87080400提到:
* p2p.com found in internal AAAA lookup black-list

這訊息告訴你,你的新 mail server 把舊 mail server 列在黑名單中了。所以叫新 server 寄給舊 server,它不爽寄,退回給原寄信者,如此而已。

看更多先前的回應...收起先前的回應...
s87080400 iT邦新手 5 級 ‧ 2015-09-20 22:48:12 檢舉

謝謝您的答案

可是小弟黑名單功能根本還未開啟阿....

明日再來檢查看看....

s87080400 iT邦新手 5 級 ‧ 2015-09-21 13:34:10 檢舉

小弟的mail server是使用 MDaemon

不知前輩知道選項在哪裡調整嗎

wiseguy iT邦超人 1 級 ‧ 2015-09-21 17:09:22 檢舉

官方站的回答,應該是 IPv6 沒設定,請參考
https://community.spiceworks.com/topic/932053-mdaemon

s87080400 iT邦新手 5 級 ‧ 2015-09-21 18:17:11 檢舉

感謝您的回答
以嘗試過您分享的方法,一樣無效喔..
小弟今日又重新安裝一次,目前選項全部都是default值
也嘗試把網域加入白名單一樣發生上述情況= =

s87080400 iT邦新手 5 級 ‧ 2015-09-22 18:55:52 檢舉

AAAA問題以解決 的確是IPv6問題
但是在解析MX 透過DNS時會出現 DNS server reports no valid records for the requested type found問題
請問這該如何排除呢

0
riches88
iT邦研究生 3 級 ‧ 2018-10-31 00:07:59

電子郵件發送容易被判為垃圾信件的處理,使用 SPF 驗證電子郵件
可以參考:https://www.richesinfo.com.tw/index.php/edm/edm-faq/174-spf

如何解決信件被Gmail標記為垃圾信?
https://www.richesinfo.com.tw/index.php/edm/edm-faq/index.php/mxmail/mxmail-faq/155-mxmail-faq-gmail

各大ISP阻擋變數
https://www.richesinfo.com.tw/index.php/edm/edm-faq/index.php/mxmail/mxmail-faq/index.php/edm/edm-faq/163-faq-edm-02

微軟阻擋信件說明:
https://www.richesinfo.com.tw/index.php/edm/edm-faq/index.php/mxmail/mxmail-faq/156-far-spam-hotmail

我要發表回答

立即登入回答