觀看單一文章
舊 2008-06-04, 09:15 PM   #1
阿 土
校長兼撞鐘
 
阿 土 的大頭照
 
註冊日期: 2000-10-09
住址: SEEDNET 8M
文章: 11,720
阿 土 已經是前無古人後無來者阿 土 已經是前無古人後無來者阿 土 已經是前無古人後無來者阿 土 已經是前無古人後無來者阿 土 已經是前無古人後無來者阿 土 已經是前無古人後無來者阿 土 已經是前無古人後無來者阿 土 已經是前無古人後無來者阿 土 已經是前無古人後無來者阿 土 已經是前無古人後無來者阿 土 已經是前無古人後無來者
發信時發生 timeout after DATA - (IP path MTU discovery)

最近幫一個客戶架設 Mail Server , 使用 Hinet 撥接方式固一 IP (PPPoE) 方式連線

客戶反應對方信寄不進來
檢查 maillog 後發現部分主機與 mail server 連線後會發生 timeout 逾時自動斷線

以下是 log :
引用:
Jun 3 00:17:25 mail postfix/smtpd[83762]: connect from sa8.bezeqint.net[192.115.104.22]
Jun 3 00:17:27 mail postfix/smtpd[83762]: 615DA33CC5: client=sa8.bezeqint.net[192.115.104.22]
Jun 3 00:22:27 mail postfix/smtpd[83762]: timeout after DATA from sa8.bezeqint.net[192.115.104.22]
Jun 3 00:22:27 mail postfix/smtpd[83762]: disconnect from sa8.bezeqint.net[192.115.104.22]

Jun 3 00:28:00 mail postfix/smtpd[83968]: connect from sa5.bezeqint.net[192.115.104.19]
Jun 3 00:28:02 mail postfix/smtpd[83968]: 0FC4B33E34: client=sa5.bezeqint.net[192.115.104.19]
Jun 3 00:33:02 mail postfix/smtpd[83968]: timeout after DATA from sa5.bezeqint.net[192.115.104.19]
Jun 3 00:33:02 mail postfix/smtpd[83968]: disconnect from sa5.bezeqint.net[192.115.104.19]

Jun 3 16:26:24 mail postfix/smtpd[13255]: connect from unknown[140.110.208.2]
Jun 3 16:26:24 mail postfix/smtpd[13255]: DFFC633CC6: client=unknown[140.110.208.2]
Jun 3 16:27:44 mail postfix/smtpd[13255]: timeout after DATA from unknown[140.110.208.2]
Jun 3 16:27:44 mail postfix/smtpd[13255]: disconnect from unknown[140.110.208.2]
花了幾個小時 , find & test 找到問題點 , 留下記錄給有需要的朋友參考

請參考 postfix faq : 關於 timeout
http://www.postfix.org/faq.html#timeouts

主要是 : IP path MTU discovery 造成

送信方主機端關閉了 "path MTU discovery" , 信一樣可以送 , 但是可能會造成部分人受害
Workaround: at the sending machine, disable path MTU discovery. Mail will get out, but of course everyone else will still suffer.

收信端要將 MTU 設定小一點以接受對方 Server 關閉 "path MTU discovery" 造成的問題
例如 : 使用 PPPoE 的用戶 , 將 MTU 設定在 1500 以下
Workaround: at the receiving machine, set a smaller MTU. For example, people using PPPoE (PPP over Ethernet) often have to choose an MTU lightly smaller than the default 1500 for ethernet.

此 Case 剛好是使用 PPPoE 撥接的用戶 , 預設 MTU 為 1500 , 改成 1400 後 , 原本收不下來的信件很順利的收下了

後來發現偶而還是有 timeout 的錯誤訊息 , 於是再調整成 1200

測試一晚後 , 發現調到 1200 比較不會發生類似的問題 , log 只剩 2 筆 timeout

調整 MTU 的指令為:
tun0 = PPPoE 使用的網路介面
引用:
ifconfig tun0 mtu 1400
PS : 往後會新增 mail server , Anti-spam 版 , 讓有需要的朋友可以彼此交流


阿 土 目前未上線   回覆時引用此篇文章