我們的服務器升級到Ubuntu Hardy Heron 8.04後發現郵件服務急劇上升,最終檢查發現SMTP服務不安全了:全面開放了,這可是一個大問題。
經過一系列測試發現,修改了/etc/postfix/master.cf,去掉了這兩個的注釋:
smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_etrn_restrictions=reject
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - - - - smtpd
-o smtpd_etrn_restrictions=reject
-o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
這樣就要求客戶端必須使用TLS來連接,並必須通過驗證。
暫時還不清楚是否對本機上的其他Web郵件服務是否有影響。