小编Ove*_*erv的帖子

如何在 Postfix 中设置 smtpd 的用户名和密码?

我通过将此配置添加到main.cf以下内容将 Postfix 设置为 SMTP 服务器:

myhostname = foo.com
mydomain = foo.com
myorigin = $mydomain

smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_invalid_helo_hostname
smtpd_recipient_restrictions = reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
Run Code Online (Sandbox Code Playgroud)

sasl_passwd文件如下所示:

foo.com    user:pass
Run Code Online (Sandbox Code Playgroud)

我已经sasl_passwd.db从那个文件中生成了一个。不幸的是,当使用用户名和密码连接到我的服务器时,我不断遇到身份验证失败。我究竟做错了什么?

smtp postfix authentication

4
推荐指数
1
解决办法
3万
查看次数

标签 统计

authentication ×1

postfix ×1

smtp ×1