后缀允许用户名和密码中继

我几乎默认configurationPostfix

如何在从“mynetworks”IP以外的地方转发邮件之前configurationPostfix以询问用户名/密码?

非常感谢你

所以postfix上的SASL是很难configuration的。

神奇的线条是:

# main.cf # In each of these: smtpd_*_restrictions = permit_mynetworks, permit_sasl_authenticated, ... smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous smtpd_sasl_local_domain = $myhostname smtpd_sasl_authenticated_header = yes broken_sasl_auth_clients = yes 

您需要TLS来确保数据安全性,这些文件是标准的SSL密钥对:

 smtpd_tls_cert_file=PEM-FILE-NAME smtpd_tls_key_file=KEY-FILE-NAME smtpd_use_tls = yes 

你也想听SMTP提交端口,需要这样的东西:

 submission inet n - - - - smtpd -o smtpd_enforce_tls=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject 

实际configurationSASL后端高度依赖于您的身份validation源,所以我需要信息build议。

你正在寻找的是Postfix与SASLauthentication。 您需要使用Cyrus SASL库来validation您的用户,但也可以使用dovecot。

Dovecot是我的最爱,无论如何你很可能需要一个POP3 / IMAP(和LDA)服务。 通过dovecot,您可以非常轻松地将您的用户与POP3 / IMAP用户的数据库进行身份validation。 Postfix.org有一个关于如何使用Dovecot / Cyrus设置Postfix / SASL的指南: http : //www.postfix.org/SASL_README.html 。