Postfix를 설치 후, imap/pop3을 연동하기 위해서 dovecot를 설치하는 간단한 가이드를 작성한다.
dovecot postfix와 연동하는 방법이다.
1. dovecot 설치
$ sudo apt install dovecot-core dovecot-pop3d dovecot-imapd
2. dovecot 설정
ㅇ. /etc/dovecot/dovecot.conf
protocols = imap pop3
ㅇ. /etc/dovecot/conf.d/10-master.conf
unix_listener auth-userdb {
#mode = 0666
#user =
#group =
}
to
# unix_listener auth-userdb {
# #mode = 0666
# #user =
# #group =
# }
#unix_listener /var/spool/postfix/private/auth {
# mode = 0666
#}
to
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
ㅇ. /etc/dovecot/conf.d/10-ssl.conf
ssl_cert = </etc/dovecot/private/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.key
to
ssl_cert = </etc/ssl/conf/fullchain.pem
ssl_key = </etc/ssl/conf/privkey.pem
ㅇ. /etc/dovecot/conf.d/10-auth.conf
#auth_username_format = %Lu
to
auth_username_format = %n
(해당 설정은 id@domain 로그인이 가능하도록 설정)
auth_mechanisms = plain
to
auth_mechanisms = plain login
ㅇ. /etc/dovecot/conf.d/10-mail.conf
mail_location = mbox:~/mail:INBOX=/var/mail/%u
to
mail_location = maildir:~/Maildir
ㅇ. /etc/dovecot/conf.d/20-pop3.conf
#pop3_uidl_format = %08Xu%08Xv
to
pop3_uidl_format = %08Xu%08Xv
#pop3_client_workarounds =
to
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh