주 메뉴 열기

wwiki β

Dovecot

Jhkim (토론 | 기여)님의 2019년 1월 2일 (수) 08:20 판 (설정확인)

목차

개요

Dovecot은 Linux/Unix 계열 시스템 용 IMAP과 POP3 전자메일 서버

설치

$ apt-get install -y dovecot-core

LDAP 연동

보내는 메일의 인증방식이 dovecot의 SASL을 사용하는 경우 메일을 보내기 위하여 SMTP서버에 접속할 때 다음 방법으로 LDAP와 연동할 수 있다.

패키지 설치

$ sudo apt install dovecot-ldap

설정 수정

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

#주석처리(PAM인증을 사용하지 않음)

#!include auth-system.conf.ext

#주석해제

!include auth-ldap.conf.ext

/etc/dovecot/conf.d/10-logging.conf

auth_verbose = yes

auth_verbose_passwords = yes

auth_debug = yes

auth_debug_passwords = yes

mail_debug = yes

/etc/dovecot/conf.d/auth-ldap.conf.ext

passdb {

driver = ldap

args = /etc/dovecot/dovecot-ldap.conf.ext

}

userdb {

driver = ldap

args = /etc/dovecot/dovecot-ldap.conf.ext

# default_fields = home=/home/mail/%d/%u

}

/etc/dovecot/dovecot-ldap.conf.ext

hosts = localhost

dn = cn=[로그인계정],dc=example,dc=com

dnpass = [password]

ldap_version = 3

base = ou=users,dc=example,dc=com

deref = never

scope = onelevel

default_pass_scheme = plain

user_attrs = cn=user,mailDirectory=homeDirectory

user_filter = (cn=%n)

pass_attrs = cn=user,userPassword=Password

pass_filter = (cn=%n)

설정확인

$ dovecot -n

테스트

IMAP 확인