RedHat 5.4下构建postfix全功能电子邮(四)-Dovecot软件安装
1、安装Dovecot
[root@mail ~]# cd /soft/
[root@mail soft]# tar -zxvf dovecot-1.1.4.tar.gz -C /usr/local/src/
[root@mail soft]# cd /usr/local/src/dovecot-1.1.4/
[root@mail dovecot-1.1.4]# groupadd dovecot
[root@mail dovecot-1.1.4]# useradd -M -s /sbin/nologin dovecot
[root@mail dovecot-1.1.4]# ./configure --sysconfdir=/etc --with-mysql && make && make install
2、安装完成,配置
[root@mail dovecot-1.1.4]# cp /etc/dovecot-example.conf /etc/dovecot.conf
[root@mail dovecot-1.1.4]# vim /etc/dovecot.conf
23 protocols = pop3 imap
47 disable_plaintext_auth = no
87 ssl_disable = yes
208 mail_location = maildir:~/Maildir
[root@mail ~]# vim /etc/postfix/main.cf
415 home_mailbox = Maildir/
[root@mail dovecot-1.1.4]# vim /etc/pam.d/dovecot
auth required pam_nologin.so
auth include system-auth
account include system-auth
session include system-auth
#/usr/local/sbin/dovecot -c /etc/dovecot.conf 启动把这句话写入开机脚本
# pkill -1 dovecot #重新读取dovecot
[root@mail dovecot-1.1.4]# /usr/local/sbin/dovecot -c /etc/dovecot.conf
测试接受服务器dovecot
[root@mail ~]# telnet mail.shuiyong.com 110
Trying 10.20.5.35...
Connected to mail.shuiyong.com (10.20.5.35).
Escape character is '^]'.
+OK Dovecot ready.
user user2
+OK
pass 123
+OK Logged in.
list
+OK 1 messages:
. 1 432
.
retr 1
+OK 432 octets
Return-Path: <[email protected] >
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from mail. shuiyong.com (mail.shuiyong.com [10.20.5.35])
by mail. shuiyong.com (Postfix) with ESMTP id 6FA1116DEF5
for <user2@ shuiyong.com >; Tue, 15 oct 2012 17:46:37 +0800 (CST)
Message-Id: <[email protected]>
Date: Tue, 15 oct 2012 17:46:37 +0800 (CST)
From: user1@ shuiyong.com
11111111111111
.
quit
+OK Logging out.
Connection closed by foreign host.