Postfix

Postfix sasl 中繼主機

  • November 12, 2009

我正在嘗試將 SASL 設置為中繼主機以發送外部電子郵件。我讀了很多書,做了我應該做的一切。但是,我們的提供商不會接受我轉發電子郵件(我們不在他們的網路上,但他們說只要我們使用 SASL 進行身份驗證就可以了):

主機 mailhost.zen.co.uk

$$ 212.23.3.98 $$說:550-這不是一個開放的繼電器。要通過此伺服器發送,您必須是 Zen Internet IP 地址上的 550,或者通過 TLS 進行身份驗證。(回复 MAIL FROM 命令)

我們同意我不會發送使用者名和密碼,否則它會發送或說我的使用者名密碼不正確。

問題是,為什麼 postfix 不發送它:

這是我認為相關的 main.conf 部分:

   smtpd_helo_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_hostname, reject_invalid_hostname, permit

   smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org, reject_rbl_client blackholes.easynet.nl, reject_rbl_client dnsbl.njabl.org

   smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unauth_destination, check_policy_service inet:127.0.0.1:60000, permit

   smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit

   relayhost = mailhost.zen.co.uk
   smtpd_sasl_auth_enable = yes
   smtpd_sasl_password_maps = hash:/etc/postfix/sasl_passwd
   smtpd_sasl_type = cyrus
   smtpd_sasl_authenticated_header = no
   broken_sasl_auth_clients = yes
   smtpd_sasl_security_options = noanonymous
   smtpd_sasl_local_domain =

當然,我已經在 sasl_passwd 中設置了密碼並對其進行了後映射。以下是我一直在使用的一些資源:

如果有人有任何其他建議會很棒:)

如果您希望來自 MTA 的 SMTP 連接mailhost.zen.co.uk經過 SASL 身份驗證,則需要smtp_sasl_*參數,而不是smtpd_sasl_*參數。後者適用於您是接收MTA 時,而前者適用於您連接到另一個 MTA 時,正如您在這裡似乎想要做的那樣。

引用自:https://serverfault.com/questions/84134