Настроил Exim+Courier-Imap. Адреса берутся из Active Directory. Exim работает нормально, а Courier-Imap работает только в том случае если пароли в Active Directory не содержат русские символы.
Когда в пароле присутствуют русские символы выходит такое сообщение:
Код: Выделить всё
Nov 20 11:59:47 email imapd: LOGIN FAILED, user=ivanov_ii, ip=[172.16.14.13]
Nov 20 11:59:47 email imapd: authentication error: Input/output error
Код: Выделить всё
# cat /usr/local/etc/courier-imap/imapd
##NAME: ADDRESS:0
ADDRESS=0
##NAME: PORT:1
PORT=143
##NAME: AUTHSERVICE:0
# AUTHSERVICE143=imap
# AUTHSERVICE993=imaps
##NAME: MAXDAEMONS:0
MAXDAEMONS=40
##NAME: MAXPERIP:0
MAXPERIP=4
##NAME: PIDFILE:0
PIDFILE=/var/run/imapd.pid
##NAME: TCPDOPTS:0
TCPDOPTS="-nodnslookup -noidentlookup"
##NAME: LOGGEROPTS:0
LOGGEROPTS="-name=imapd"
##NAME: DEFDOMAIN:0
#DEFDOMAIN="@example.com"
##NAME: IMAP_CAPABILITY:1
IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE"
##NAME: KEYWORDS_CAPABILITY:0
IMAP_KEYWORDS=1
##NAME: ACL_CAPABILITY:0
IMAP_ACL=1
##NAME: SMAP1_CAPABILITY:0
# SMAP_CAPABILITY=SMAP1
##NAME: IMAP_CAPABILITY_ORIG:2
IMAP_CAPABILITY_ORIG="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256 IDLE"
##NAME: IMAP_PROXY:0
IMAP_PROXY=0
##NAME: PROXY_HOSTNAME:0
# PROXY_HOSTNAME=
##NAME: IMAP_PROXY_FOREIGN:0
IMAP_PROXY_FOREIGN=0
##NAME: IMAP_IDLE_TIMEOUT:0
IMAP_IDLE_TIMEOUT=60
##NAME: IMAP_CAPABILITY_TLS:0
IMAP_CAPABILITY_TLS="$IMAP_CAPABILITY AUTH=PLAIN"
##NAME: IMAP_TLS_ORIG:0
IMAP_CAPABILITY_TLS_ORIG="$IMAP_CAPABILITY_ORIG AUTH=PLAIN"
##NAME: IMAP_DISABLETHREADSORT:0
IMAP_DISABLETHREADSORT=0
##NAME: IMAP_CHECK_ALL_FOLDERS:0
IMAP_CHECK_ALL_FOLDERS=0
##NAME: IMAP_OBSOLETE_CLIENT:0
IMAP_OBSOLETE_CLIENT=0
##NAME: IMAP_UMASK:0
IMAP_UMASK=022
##NAME: IMAP_ULIMITD:0
IMAP_ULIMITD=65536
##NAME: IMAP_USELOCKS:0
IMAP_USELOCKS=1
##NAME: IMAP_SHAREDINDEXFILE:0
IMAP_SHAREDINDEXFILE=/usr/local/etc/courier-imap/shared/index
##NAME: IMAP_ENHANCEDIDLE:0
IMAP_ENHANCEDIDLE=0
##NAME: IMAP_TRASHFOLDERNAME:0
IMAP_TRASHFOLDERNAME=Trash
##NAME: IMAP_EMPTYTRASH:0
IMAP_EMPTYTRASH=Trash:7
##NAME: IMAP_MOVE_EXPUNGE_TO_TRASH:0
IMAP_MOVE_EXPUNGE_TO_TRASH=0
##NAME: OUTBOX:0
# OUTBOX=.Outbox
##NAME: SENDMAIL:0
SENDMAIL=/usr/local/sbin/exim
##NAME: HEADERFROM:0
HEADERFROM=X-IMAP-Sender
##NAME: OUTBOX_MULTIPLE_SEND:0
# OUTBOX_MULTIPLE_SEND=1
##NAME: IMAPDSTART:0
IMAPDSTART=YES
##NAME: MAILDIRPATH:0
MAILDIRPATH=Maildir
Код: Выделить всё
# cat /usr/local/etc/authlib/authdaemonrc
##NAME: authmodulelist:2
authmodulelist="authldap"
##NAME: authmodulelistorig:3
authmodulelistorig="authldap"
##NAME: daemons:0
daemons=5
##NAME: authdaemonvar:2
authdaemonvar=/var/run/authdaemond
##NAME: subsystem:0
subsystem=mail
##NAME: DEBUG_LOGIN:0
DEBUG_LOGIN=1
##NAME: DEFAULTOPTIONS:0
DEFAULTOPTIONS="wbnodsn=1"
##NAME: LOGGEROPTS:0
LOGGEROPTS=""
##NAME: LDAP_TLS_OPTIONS:0
#LDAPTLS_CACERT=/path/to/cacert.pem
#LDAPTLS_REQCERT=demand
#LDAPTLS_CERT=/path/to/clientcert.pem
#LDAPTLS_KEY=/path/to/clientkey.pem
Код: Выделить всё
# cat /usr/local/etc/authlib/authldaprc
##NAME: LOCATION:1
LDAP_URI ldap://172.16.14.10
##NAME: LDAP_PROTOCOL_VERSION:0
LDAP_PROTOCOL_VERSION 3
##NAME: LDAP_BASEDN:0
LDAP_BASEDN ou=us,dc=pentagon,dc=mil
##NAME: LDAP_BINDDN:0
LDAP_BINDDN cn=exim,ou=mail,dc=pentagon,dc=mil
LDAP_BINDPW 124
##NAME: LDAP_TIMEOUT:0
LDAP_TIMEOUT 5
##NAME: LDAP_AUTHBIND:0
LDAP_AUTHBIND 1
##NAME: LDAP_MAIL:0
LDAP_MAIL mail
##NAME: LDAP_FILTER:0
# LDAP_FILTER (objectClass=CourierMailAccount)
##NAME: LDAP_DOMAIN:0
LDAP_DOMAIN pentagon.mil
##NAME: LDAP_GLOB_IDS:0
LDAP_GLOB_UID mailnull
LDAP_GLOB_GID mailnull
##NAME: LDAP_HOMEDIR:0
LDAP_HOMEDIR sAMAccountName
##NAME: LDAP_MAILROOT:0
LDAP_MAILROOT /var/spool/mail
##NAME: LDAP_MAILDIR:0
# LDAP_MAILDIR mailbox
##NAME: LDAP_DEFAULTDELIVERY:0
#LDAP_DEFAULTDELIVERY defaultDelivery
##NAME: LDAP_MAILDIRQUOTA:0
LDAP_MAILDIRQUOTA telephoneNumber
##NAME: LDAP_FULLNAME:0
LDAP_FULLNAME cn
##NAME: LDAP_PW:0
#LDAP_CLEARPW clearPassword
#LDAP_CRYPTPW userPassword
##NAME: LDAP_IDS:0
# LDAP_UID uidNumber
# LDAP_GID gidNumber
##NAME: LDAP_ENUMERATE_FILTER:0
# LDAP_ENUMERATE_FILTER (&(objectClass=CourierMailAccount)(!(disableshared=1)))
##NAME: LDAP_DEREF:0
LDAP_DEREF never
##NAME: LDAP_TLS:0
LDAP_TLS 0
##NAME: LDAP_EMAILMAP:0
# LDAP_EMAILMAP (&(userid=@user@)(realm=@realm@))
##NAME: LDAP_EMAILMAP_BASEDN:0
LDAP_EMAILMAP_BASEDN ou=us,dc=pentagon,dc=mil
##NAME: LDAP_EMAILMAP_ATTRIBUTE:0
# LDAP_EMAILMAP_ATTRIBUTE handle
##NAME: LDAP_EMAILMAP_MAIL:0
# LDAP_EMAILMAP_MAIL mail