[Dovecot] Problem with LDAP query

Aleix Dorca adorca at uda.ad
Thu Jun 10 13:58:41 EEST 2010


Hi people,

first message to this list.

I've a problem with dovecot 1.0.15 (debian latest package) and an LDAP query. The situation is the following. My LDAP users have multiple mail addresses (field 'mail') and mail should be able to be sent to any of these and the mail should always end on the user's mailbox. This is not working for me now.

My dovecot-ldap.conf relevant config shows:

user-attrs = uid=user
user_filter = (&(objectClass=posixAccount)(|(uid=%n)(mail=%u)))

This correctly detects multiple addresses but mail always end in folder (from dovecot.conf):

mail_location = maildir:/home/vmail/%n/Maildir

So if user at domain gets a mail it ends in /home/vmail/user/Maildir but if the same user gets an email to user-alt at domain it ends in /home/vmail/user-alt/Maildir instead of /home/vmail/user/Maildir.

I've been debugging and I get this on my mail.log file:

Jun 10 12:41:29 horologium deliver(user-alt at domain): auth input: user-alt at domain
Jun 10 12:41:29 horologium deliver(user-alt at domain): auth input: user=user
Jun 10 12:41:29 horologium deliver(user-alt at domain): auth input: uid=5000
Jun 10 12:41:29 horologium deliver(user-alt at domain): auth input: gid=5000
Jun 10 12:41:29 horologium deliver(user-alt at domain): maildir: data=/home/vmail/user-alt/Maildir
Jun 10 12:41:29 horologium deliver(user-alt at domain): maildir: root=/home/vmail/user-alt/Maildir, index=/home/vmail/user-alt/Maildir, control=, inbox=

Since I'm in version 1.0.15 can't use the mailLocation with the $ substitution.

Anyway, any help will be appreciated.

My dovecot -n result:

# 1.0.15: /etc/dovecot/dovecot.conf
log_timestamp: %Y-%m-%d %H:%M:%S 
protocols: imap imaps pop3 pop3s
ssl_cert_file: /etc/dovecot/certs/domain.crt
ssl_key_file: /etc/dovecot/certs/domain.key
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
mail_privileged_group: mail
mail_location: maildir:/home/vmail/%n/Maildir
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
pop3_uidl_format(default): 
pop3_uidl_format(imap): 
pop3_uidl_format(pop3): %08Xu%08Xv
auth default:
  mechanisms: plain login
  passdb:
    driver: ldap
    args: /etc/dovecot/dovecot-ldap.conf
  userdb:
    driver: ldap
    args: /etc/dovecot/dovecot-ldap.conf
  socket:
    type: listen
    master:
      path: /var/run/dovecot/auth-master
      mode: 384
      user: vmail
      group: vmail

Thanks a lot,

Aleix Dorca.


More information about the dovecot mailing list