Linux学习-postfix+sasl2配置

本文详细介绍了如何在Postfix 2.11.11中启用Cyrus SASL认证,包括配置步骤、验证支持、设置限制及密码管理,还展示了发送邮件和测试认证过程中的常见问题与解决方法。

本文基于postfix2.11.11和sasl2
postfix的安装详见:postfix安装
为postfix开启基于cyrus-sasl的认证功能

#验证postfix是否支持cyrus风格的sasl认证,如果输出结果如下,表示支持
[root@mail ~]# postconf -a
cyrus
dovecot
#修改/etc/postfix/main.cf
# sasl configuration
broken_sasl_auth_clients = yes
#permit_mynetworks:允许本地网络
#permit_sasl_authenticated:允许sasl验证通过的用户
#reject_invalid_hostname:拒绝不合法的主机名收发邮件
#reject_non_fqdn_hostname:拒绝主机名非FQDN格式的用户
#reject_unknown_sender_domain:拒绝未知的发件人域
#reject_non_fqdn_sender:没有FQDN用户
#reject_non_fqdn_recipient:非FQDN的接收者
#reject_unknown_recipient_domain:无法识别的收件人域
#reject_unauth_pipelining:无法验证的管道
#reject_unauth_destination:无法认证的目标地址,放最后
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_non_fqdn_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
#安全选项,不直接匿名用户
smtpd_sasl_security_options = noanonymous
#The name of the configuration file (default: smtpd.conf) is configurable. It is a concatenation from a value that the Postfix SMTP server sends to the Cyrus SASL library, and the suffix .conf, added by Cyrus SASL.
#哪个应用程序使用sasl功能
smtpd_sasl_path = smtpd
#欢迎信息
smtpd_banner = Welcome to our $myhostname ESMTP,Warning:Version not Available!

[root@mail ~]# vim /usr/lib64/sasl2/smtpd.conf
pwcheck_method: saslau
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值