k bah
2008-Nov-21 11:06 UTC
[Dovecot] userdb, Dovecot LDA not using mail_location config properly?
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=, inboxhost 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
Timo Sirainen
2008-Nov-21 12:36 UTC
[Dovecot] userdb, Dovecot LDA not using mail_location config properly?
On Fri, 2008-11-21 at 08:06 -0300, k bah wrote:> (#1) host deliver(person at mydomain.com): auth input: user=person~mydomain.com..> 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(?).deliver currently ignores if userdb returns "user". Hmm. I guess I could finally fix this for v1.2. The only problem left to figure out is if the log line prefix should then be changed also. I guess it should. Done: http://hg.dovecot.org/dovecot-1.2/rev/ed4d6f6e4da7 Won't help with v1.1 though.. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20081121/7257dc1f/attachment-0002.bin>