Shunze 學園 (http://www.shunze.info/forum/index.php)
|- 吃軟不吃硬 (http://www.shunze.info/forum/board.php?boardid=3)
|-- 《分享》Mail size is too small (http://www.shunze.info/forum/threadid.php?boardid=3&threadid=2034)


作者: shunze 發表時間: 2017-04-05, 10:50:

《分享》Mail size is too small

最近在架設Sophos XG的Email Protection遇到了一個少見且奇怪的問題,
寄件端使用者收到了 郵件太小 的退件。



郵件太大被拒挺常見,但郵件太小被拒倒是第一次看到,
且網路上幾乎找不到有用線索...


從XG上的log來看,郵件的發起、連線與各種檢查機制都正常,
是在最後要送出給收件端的mail server時,被mail server所拒絕,原因是“Mail size is too small”!?

INFO Feb 9 9:42:50 [0x200571b4]: RBL result: host 111.222.123.123.spamcop.net seems clean
INFO Feb 9 9:42:50 [0x200571b4]: RBL result: host 111.222.123.123.dnsbl-1.uceprotect.net seems clean
MESSAGE Feb 9 9:42:50 [0x200571b4]: [0x200571b40](XXX@YYY.com.tw)SF Policy Action: ACCEPT
MESSAGE Feb 9 9:42:50 [0x200571b4]: [0x200571b40] Mail Received with 552 Requested mail action aborted: Mail size is too small
MESSAGE Feb 9 9:42:50 [3941976896]: Notification generated for Mail sending failure: Recipient ZZZ@ttt.com, Mail server 123.123.123.123:25
INFO Feb 9 9:42:50 [0x200571b4]: Request: 'QUIT'
ERROR Feb 9 9:42:50 [0x200571b5]: write_rwbuffer: write failed(57): Broken pipe


回頭在收件端的mail server (RaidenMAILD)來查看log,發現該郵件被RaidenMAILD判斷其內容少於150 bytes,
不可能是正常信件內容的大小,所以被該mail server所拒!
[2017/2/9 上午 09:42:50] [3100] 172.16.0.123 - 郵件內容少於 150 bytes, 因不可能為正常信, 故放棄處理
[2017/2/9 上午 09:42:50] [3100] SMTP 服務中斷從 172.16.0.123 來的連線


雖然郵件收發過程中有多加一層XG做郵件防護,有可能是XG掃描過程中產生了干擾,
但只有極少部分郵件有此現象,且是被mail server所拒,
所以最後決定從mail server下手,試圖解除此150個bytes的判斷機制。


詢問RaidenMAILD的台灣代理商-村榮資訊後,
在RaidenMAILD中,確實有此判斷機制與參數存在。
RaidenMAILD.ini 設定檔中找到 MAILSIZEATLEAST 參數(預設值是150),
修改成更小的值,例如10或直接設定為0,然後重啟mail server服務。

重啟後,RaidenMAILD的Mail size is too small退件的問題應該就會改善了∼

Powered by: Burning Board 1.1.1 2001 by WoltLab
Taiwan Translation by Achi