sasl认证
1.查看系统版本
[root@server79 ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 6.3 (Santiago)
Kernel \r on an \m
2.下载与系统版本相匹配的cyrus-sasl认证包
[root@server79 ~]# yum localinstall cyrus-sasl-sql-2.1.23-13.el6.x86_64.rpm
3 查看所装cyrus-sasl版本
[root@server79 ~]# rpm -q cyrus-sasl
cyrus-sasl-2.1.23-13.el6.x86_64
4.编辑认证协议
[root@server79 sasl2]# vim /etc/sasl2/smtpd.conf
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5 NTLM
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: extmail
sql_passwd: extmail
sql_database: extmail
sql_select: SELECT password FROM mailbox WHERE username = '%u@%r'
5.查看认证协议的参数
[root@server79 sasl2]# postconf -d | grep ^smtpd_sasl
6.打开认证
[root@server79 sasl2]# postconf -e smtpd_sasl_auth_enable=yes
[root@server79 sasl2]# postconf -e smtpd_sasl_authenticated_header=yes
[root@server79 sasl2]# postconf -d | grep ^smtpd_relay
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination
7.生成用户加密串
[root@server79 sasl2]# perl -MMIME::Base64 -e 'print encode_base64("\0cun\@extmail.org\0westos");'
8.验证
[root@server79 sasl2]# telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 server79.example.com ESMTP Postfix
ehlo localhost
250-server79.example.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN CRAM-MD5 DIGEST-MD5 PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth plain AGN1bkBleHRtYWlsLm9yZwB3ZXN0b3M=
235 2.7.0 Authentication successful
quit
221 2.0.0 Bye
验证成功
9.用雷鸟进行收发邮件即可感受到其效果
雷鸟设置:
setting->Outgoing Server-Edit->servername 192.168.0.179,port 25,connection security:NONE,Authentication method:Password,transmitted,User Name:cun@extmail.org
postfix发件认证
原创cunlifang 博主文章分类:postfix发送邮件 ©著作权
©著作权归作者所有:来自51CTO博客作者cunlifang的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:postfix升级,加密
下一篇:postfix-tls加密
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
postfix smtp认证
postfix stmp
职场 休闲 postfix stmp -
Linux中Postfix邮件认证配置(五)email linux 客户端 访问表 服务器