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=<[EMAIL PROTECTED]>
host postfix/smtpd[8923]: disconnect from localhost[127.0.0.1]
host postfix/qmgr[8894]: 5B449EA2C6: from=<[EMAIL PROTECTED]>, size=368, 
nrcpt=1 (queue active)
host deliver([EMAIL PROTECTED]): Loading modules from directory: 
/usr/lib/dovecot/modules/lda
host deliver([EMAIL PROTECTED]): Module loaded: 
/usr/lib/dovecot/modules/lda/lib10_quota_plugin.so
host dovecot: auth(default): master in: USER    1       [EMAIL PROTECTED]       
service=deliver
host dovecot: auth(default): prefetch([EMAIL PROTECTED]): passdb didn't return 
userdb entries
(#0) host dovecot: auth(default): ldap([EMAIL PROTECTED]): user search: 
base=dc=mydomain,dc=com scope=subtree filter=(&(objectclass=postfixuser)([EMAIL 
PROTECTED])) fields=uid
host deliver([EMAIL PROTECTED]): auth input: [EMAIL PROTECTED]
(#1) host deliver([EMAIL PROTECTED]): auth input: user=person~mydomain.com
host deliver([EMAIL PROTECTED]): auth input: uid=501
host deliver([EMAIL PROTECTED]): auth input: gid=12
(#2) host deliver([EMAIL PROTECTED]): maildir: data=/var/spool/mail/data/[EMAIL 
PROTECTED]:INDEX=/var/spool/mail/index/[EMAIL PROTECTED]
(#3) host deliver([EMAIL PROTECTED]): maildir: root=/var/spool/mail/data/[EMAIL 
PROTECTED], index=/var/spool/mail/index/[EMAIL PROTECTED], control=, inbox=
host dovecot: auth(default): master out: USER   1       [EMAIL PROTECTED]       
user=person~mydomain.com        uid=501 gid=12
host deliver([EMAIL PROTECTED]): msgid=<[EMAIL PROTECTED]>: saved mail to INBOX
host postfix/pipe[8929]: 5B449EA2C6: to=<[EMAIL PROTECTED]>, 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 "[EMAIL PROTECTED]" 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 = [EMAIL 
PROTECTED], 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

Reply via email to