postfix提交連接埠限制

postfix提交連接埠限制

我想設定 Postfix (在 ubuntu 14.04 上)來使用提交端口,但我擔心它可能會成為開放中繼。我想知道每個限制列表的最佳限制是什麼(預設有 $mua_ 變量,意味著基本上沒有任何限制?)

這是 Ubuntu 中預設的 master.cf 配置:

submission inet n       -       -       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
  -o smtpd_client_restrictions=$mua_client_restrictions
  -o smtpd_helo_restrictions=$mua_helo_restrictions
  -o smtpd_sender_restrictions=$mua_sender_restrictions
  -o smtpd_recipient_restrictions=
  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING

以下是postconf -Mx(將擴展 $mua_ 變數)的內容:

submission inet  n       -       -       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
  -o smtpd_client_restrictions= 
  -o smtpd_helo_restrictions=
  -o smtpd_sender_restrictions=
  -o smtpd_recipient_restrictions=
  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING

因此,我猜測,只要用戶是 SASL 身份驗證用戶,他或她就能夠使用任何帳戶向任何目的地發送電子郵件,沒有 helo 或客戶端限制(我猜測這是因為 MUA -像outlook一樣-而不是伺服器將連接到此端口,所以你不想太挑剔)

儘管事實如此,但我認為一些限制是好的:

  • reject_non_fqdn_senderreject_unlisted_sendersmtpd_sender_restrictions
  • reject_non_fqdn_recipient為了smtpd_recipient_restrictions

這些限制清單上還有哪些理想的限制?

答案1

如果你是,它永遠不會成為開放中繼需要身份驗證

如果您擔心您的使用者沒有使用好的密碼,您可以使用 postfix、iptables 或外部防火牆將網路限制在特定的 IP 範圍內。

另一個好主意是添加fail2ban 作為強力保護機制。

與任何電子郵件系統一樣,您應該始終監控濫用情況,確保擁有有效的郵政局長郵箱以及濫用情況。監控 RBL 並設定回饋循環也是很好的做法。

相關內容