广告

本站里的文章大部分经过自行整理与测试

2017年1月4日星期三

Linux - Dovecot 安装

Dovecot 是 IMAP / POP 的 Mail Server

1. 安装

Ubuntu
$ apt install dovecot-core dovecot-pop3d dovecot-imapd

Fedora
$ dnf install dovecot

CentOS
$ yum install dovecot

OpenSUSE
$ zypper install dovecot

2. 设置

$ gedit /etc/dovecot/dovecot.conf

# Fedora / CentOS
protocols = imap pop3 lmtp

listen = *, ::

$ gedit /etc/dovecot/conf.d/10-auth.conf

disable_plaintext_auth = no
auth_mechanisms = plain login

$ gedit /etc/dovecot/conf.d/10-mail.conf

mail_location = maildir:~/Maildir

$ gedit /etc/dovecot/conf.d/10-master.conf

unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = postfix
    group = postfix
}

# Fedora / CentOS
$ gedit /etc/dovecot/conf.d/10-ssl.conf

ssl = no

3. 重启

$ systemctl restart dovecot

4. 防火壁

Ubuntu
$ ufw allow 110/tcp
$ ufw allow 143/tcp

Fedora / CentOS
$ firewall-cmd --add-port={110/tcp,143/tcp} --permanent

$ firewall-cmd --add-service={pop3,imap} --permanent
$ firewall-cmd --reload

没有评论:

发表评论