CentOS 6.0安装Postfix+Dovecot+Sasl+OpenWebMail+Httpd+Bind

postfix ,但是它只是一个 smtp server ,要配置完整的 mail 还要有个 pop3/imap ,在这里我选择了 dovecot ,原因是比较新,更重要的是,它有很多安全配置功能。

CentOS 6.0安装Postfix+Dovecot+Sasl+OpenWebMail+Httpd+Bind

很多 C/S 的协议是没有验证能力的,或者说验证能力很弱。所以我们要找个专业的加强用户验证功能的软件,这个软件就是 Cyrus SASL 即简单的认证机制。在网上用 LDAP 的人也很多,因为公司网络没有其他要用 LDAP 认证的,所以我没有用这个,以后会出现在补充文档里。
SASL 密码加密库 < == smtp server < == SASL 认证算法=== > smtp client
 
1.安装软件
[root@linuxidc ~]# yum  -y install lftp
[root@linuxidc ~]#lftpget RedHat/rpm/release/openwebmail.repo
[root@linuxidc ~]# lftpget
[root@linuxidc ~]# rpm -ivh perl-Text-Iconv-1.4-1.2.el5.rf.i386.rpm
[root@linuxidc ~]# cp -rf openwebmail.repo /etc/yum.repos.d
[root@linuxidc ~]# yum install postfix dovecot openwebmail cyrus-sasl httpd
 
2.配置文件
[root@linuxidc yum.repos.d]# cat /etc/dovecot/dovecot.conf //用[root@linuxidc yum.repos.d]# doveconf -n >dovecot-new.conf
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-71.el6.i686 i686 CentOS Linux release 6.0 (Final)
listen = *
auth_mechanisms = plain

disable_plaintext_auth = no
ssl= no
 
mail_location =maildir:/home/%u

mbox_write_locks = fcntl
passdb {
  driver = pam
}
protocols = pop3
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
  driver = passwd
}

[root@linuxidc ~]# chkconfig dovecot on//开机启动

[root@linuxidc ~]# service dovecot start

[root@linuxidc ~]# chkconfig saslauthd on
[root@linuxidc ~]# cat /etc/sysconfig/saslauthd
# Directory in which to place saslauthd's listening socket, pid file, and so
# on.  This directory must already exist.
SOCKETDIR=/var/run/saslauthd
# Mechanism to use when checking passwords.  Run "saslauthd -v" to get a list
# of which mechanism your installation was compiled with the ablity to use.
MECH=shadow//修改为shadow
# Options sent to the saslauthd. If the MECH is other than "pam" uncomment the next line.
# DAEMONOPTS=--user saslauth
# Additional flags to pass to saslauthd on the command line.  See saslauthd(8)
# for the list of accepted flags.
FLAGS=

[root@linuxidc sysconfig]# cat /usr/lib/sasl2/smtpd.conf//添加认证如果没有文件直接vi一个smtpd.conf文件
pwcheck_method:saslauthd
saslauthd_path:/var/run/saslauthd/mux
 
[root@linuxidc sysconfig]# service saslauthd restart
Stopping saslauthd:                                        [  OK  ]
Starting saslauthd:                                        [  OK  ]
[root@linuxidc sysconfig]# testsaslauthd -u linuxidc -p '123456' //测试成功
0: OK "Success."

linux

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/48196e7a3fefd3836f1d6d1b193969ac.html