CentOS+postfix+cyrus-sasl2
来源:互联网 发布:vmware osx优化 编辑:程序博客网 时间:2024/06/06 04:41
1.如果CentOS下已经安装sendmail,先将sendmail卸载
/etc/init.d/sendmail stop
rpm -qa | grep sendmail
rpm -e sendmail
2.安装postfix
yum -y install postfix//yum会自动将cyrus-sasl2安装上
vim /etc/postfix/main.cf
修改内容如下:
myhostname = mail.test.com
mydomain = test.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
mail.$mydomain, www.$mydomain, ftp.$mydomain
mynetworks_style = subnet
mynetworks = 127.0.0.0/8, localhost, 10.0.0.0/8
relay_domains = $mydestination
home_mailbox = Maildir/ //如果采用系统帐号作为邮件用户名,该目录为帐号下的目录
最后面添加(sasl加密算法支持)
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,reject_unauth_destination,permit_mynetworks
smtpd_client_restrictions = permit_sasl_authenticated
3.配置sasl
vi /usr/lib/sasl2/smtpd.conf
内容如下:
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
log_level:3
saslauthd_path: /var/run/saslauthd/mux
vi /etc/sysconfig/saslauthd
修改:
MECH=shadow //使用系统用户进行认证
4.设置开机启动postfix和sasl
chkconfig postfix on
chkconfig saslauthd on
5.启动postfix和sasl
service postfix start
service saslauthd start
6.验证postfix的认证
1. /usr/sbin/testsaslauthd -u root -p 123456 -s smtp
2.
[root@localhost ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.test.com ESMTP Postfix
ehlo a
250-mail.test.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
334 VXNlcm5hbWU6
cm9vdEB0ZXN0LmNvbQ==//root@test.com的base64编码
334 UGFzc3dvcmQ6
MTIzNDU2//123456的base64编码
235 2.7.0 Authentication successful
quit
221 2.0.0 Bye
Connection closed by foreign host.
[root@localhost ~]#
- CentOS+postfix+cyrus-sasl2
- Postfix集成环境(Postfix + MySQL + Cyrus-sasl2 + Courier-imap + iGENUS + Postfixadmin)
- postfix+cyrus sasl+mysql+cyrus imap +extmail on linux centos 3.8
- postfix + dovecot + cyrus-sasl
- Postfix + Cyrus-IMAP + Cyrus-SASL + MySQL + IMP
- Postfix + Cyrus-IMAP + Cyrus-SASL + MySQL + IMP
- Postfix + Cyrus-IMAP + Cyrus-SASL + MySQL + IMP
- Postfix + Cyrus-IMAP + Cyrus-SASL + MySQL + IMP
- postfix+cyrus奇怪的需求。
- postfix+sasl2构建简单邮件服务器
- Postfix+Cyrus-IMAP + Cyrus-SASL + MySQL + IMP 配置指南
- Postfix + Cyrus-IMAP + Cyrus-SASL + MySQL + IMP 完全指南
- Postfix + Cyrus-IMAP + Cyrus-SASL + MySQL + IMP完全指南
- Postfix + Cyrus-IMAP + Cyrus-SASL + MySQL + IMP 完全指南
- Postfix + Cyrus-IMAP + Cyrus-SASL + MySQL + IMP 完全指南
- Postfix + Cyrus-IMAP + Cyrus-SASL + MySQL + IMP完全指南
- postfix+cyrus-imapd搭建邮件服务器
- RedHat Linux+Postfix+Cyrus-sasl+Dovecot+Stunnel
- 强制退出Mac程序的六种方法
- 如何提高自己的学习能力
- 几种文本相似度算法的C++实现
- 友元在继承和传递中的一些问题
- 配置linux服务器之间ssh不用密码访问
- CentOS+postfix+cyrus-sasl2
- http——post
- ios 获取当前视图第一响应者
- neutron的基本原理
- 建筑群最长坡值
- AndroidHttp通信 HTTP Client与HttpURLConnection的区别
- vimrc 设置光标高亮和taglist
- Android Build System (Android 编译系统)
- HDU2571:命运(DP)