[Dovecot] userdb, Dovecot LDA not using mail_location config properly?

k bah kbah at linuxmail.org
Fri Nov 21 13:06:01 EET 2008



 I use Dovecot 1.0.5.
 I use LDAP for the user database and Dovecot LDA.

--- dovecot.conf

mail_location = maildir:/var/spool/mail/data/%Lu:INDEX=/var/spool/mail/index/%Lu

auth default {

        mechanisms = plain (Note: TLS is used anyways..)

        userdb prefetch {
        }
        passdb ldap {
        # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf
                args = /etc/dovecot/dovecot-ldap.conf_passdb (symlink do dovecot-ldap.conf)
        }
        userdb ldap {
        # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf
                args = /etc/dovecot/dovecot-ldap.conf_userdb (symlink do dovecot-ldap.conf)
        }
        socket listen {
                master {
                        path = /var/run/dovecot/auth-master
                        mode = 0600
                        user = maildeliver
                        group = mail
                }
        }
}
--- dovecot-ldap.conf

Q1: auth_bind_userdn  (commented since it would avoid the use of passdb and userdb, right?)

# auth_bind_userdn = ...
# userdb
user_filter = (&(objectclass=postfixuser)(mail=%u))
user_attrs = uid=user

# passdb
pass_filter = (&(objectclass=inetlocalmailrecipient)(uid=%u))
pass_attrs = uid=user,userPassword=password,uid=userdb_user

--- mail log

host postfix/smtpd[8923]: connect from localhost[127.0.0.1]
host postfix/smtpd[8923]: 5B449EA2C6: client=localhost[127.0.0.1]
host postfix/cleanup[8925]: 5B449EA2C6: message-id=<20081121103114.5B449EA2C6 at host>
host postfix/smtpd[8923]: disconnect from localhost[127.0.0.1]
host postfix/qmgr[8894]: 5B449EA2C6: from=<sender at otherdomain.org>, size=368, nrcpt=1 (queue active)
host deliver(person at mydomain.com): Loading modules from directory: /usr/lib/dovecot/modules/lda
host deliver(person at mydomain.com): Module loaded: /usr/lib/dovecot/modules/lda/lib10_quota_plugin.so
host dovecot: auth(default): master in: USER	1	person at mydomain.com	service=deliver
host dovecot: auth(default): prefetch(person at mydomain.com): passdb didn't return userdb entries
(#0) host dovecot: auth(default): ldap(person at mydomain.com): user search: base=dc=mydomain,dc=com scope=subtree filter=(&(objectclass=postfixuser)(mail=person at mydomain.com)) fields=uid
host deliver(person at mydomain.com): auth input: person at mydomain.com
(#1) host deliver(person at mydomain.com): auth input: user=person~mydomain.com
host deliver(person at mydomain.com): auth input: uid=501
host deliver(person at mydomain.com): auth input: gid=12
(#2) host deliver(person at mydomain.com): maildir: data=/var/spool/mail/data/person at mydomain.com:INDEX=/var/spool/mail/index/person at mydomain.com
(#3) host deliver(person at mydomain.com): maildir: root=/var/spool/mail/data/person at mydomain.com, index=/var/spool/mail/index/person at mydomain.com, control=, inbox=
host dovecot: auth(default): master out: USER	1	person at mydomain.com	user=person~mydomain.com	uid=501	gid=12
host deliver(person at mydomain.com): msgid=<20081121103114.5B449EA2C6 at host>: saved mail to INBOX
host postfix/pipe[8929]: 5B449EA2C6: to=<person at mydomain.com>, relay=dovecot, delay=0.69, delays=0.19/0.02/0/0.48, dsn=2.0.0, status=sent (delivered via dovecot service)
host postfix/qmgr[8894]: 5B449EA2C6: removed


 What I don't get is that since I use userdb (read mail log lines marked (#0-3) and the "mail_location" option from dovecot.conf), mail should be saved to "person~mydomain.com" and not "person at mydomain.com" on the disk(?).

 Q2: Did I misunderstood the meaning of userdb/mail_location, is that right (this behavior)?
 Q3: Is it misconfigured? I want to save mail on the disk to person~mydomain.com, when I get that right (save mail to what line #1 tells is "user"), I'll use mailRoutingAddress (my mailroutingaddress = person~mydomain.com at mydomain.com, mail_location would use %Ln).


 The passdb and userdb prefetch are working ok on the user is checking mail.

 thanks

=
PathMaker for Six Sigma
Complete low-cost Six Sigma toolset. Equip your black and green belts.
http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=1198ebf9f950733925452d3173332ef8


-- 
Powered by Outblaze


More information about the dovecot mailing list