1、安装系统包
使用yum安装postfix,dovecot包,启用系统服务。
1
2
3
|
yum install postfix dovecot
chkconfig postfix on
chkconfig dovecot on
|
2、配置main.cf文件
1
|
vi /etc/postfix/main.cf
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# 修改或增加如下行
myhostname = mail.fileregion.com
mydomain = fileregion.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 127.0.0.0/8
home_mailbox = Maildir/
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, permit
broken_sasl_auth_clients = yes
|
重启postfix:
1
|
/etc/init.d/postfix restart
|
3、配置Dovecot
配置dovecot.conf
:
1
|
vi /etc/dovecot/dovecot.conf
|
将下面的行取消注释:
1
2
|
protocols = imap pop3
listen = *
|
配置认证机制:
1
2
3
4
5
|
vi /etc/dovecot/conf.d/10-auth.conf
修改下面的行:
disable_plaintext_auth = no
auth_mechanisms = plain login
|
配置mail_location:
1
2
3
4
|
vi /etc/dovecot/conf.d/10-mail.conf
修改或者取消注释下面的行:
mail_location = maildir:~/Maildir
|
配置auth服务:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
vi /etc/dovecot/conf.d/10-master.conf
# 注释下面的行
#unix_listener auth-userdb {
#mode = 0600
#user =
#group =
#}
# change or setup on these line:
# Postfix smtp-auth
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
|
配置POP3:
1
2
3
4
5
|
vi /etc/dovecot/conf.d/20-pop3.conf
# 取消注释:
pop3_uidl_format = %08Xu%08Xv
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
|
重启Dovecot服务 :
1
|
/etc/init.d/dovecot restart
|
近期评论