[Dovecot] DoveCot LDA prefetch fails with LDA, works with POP client
Hi there,
I am using DoveCot 1.0.7. I know it is real old, but we have to work with it. I have configured LDAP lookup with password prefetch in DoveCot. I can successfully receive emails through DoveCot, thus proving my password prefetch and user authentication are good.
The problem is when I use Postfix to deliver message to DoveCot via LDA. My postfix master.cf looks like this:
dovecot unix - n n - - pipe flags=Rhu user=hubdirect null_sender= argv=/usr/libexec/dovecot/deliver -e -f ${sender} -d ${user}
Given a message, Postfix looks up LDAP and find the user associated with the recipient address and delivers the message using LDA. LDAP logs indicates that Postfix is returning the right user.
The problem is that DoveCot complains "passdb did not return userdb entries", but I do not know which entries passdb failed to return. Here is what I have in dovecot-ldap.conf. I have tried different things in "user_attrs", DoveCot keeps complaining the same thing.
user_attrs = username=user user_filter = (&(objectClass=DirectUser)(username=%u)(roles=*ROLE_EDGE_EMAIL*)) pass_attrs = username=user,password=password,username=userdb_user,usermaildirectory=u serdb_mail,userhomedirectory=userdb_home,825=userdb_uid,825=userdb_gid pass_filter = (&(objectClass=DirectUser)(username=%u)(roles=*ROLE_EDGE_EMAIL*))
The documentation says LDA does not use prefetch, but the log seems to indicate otherwise. I clearly see the "service=deliver" is authenticating the user first, thus using password prefetch. Can someone clarify this?
Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): Loading modules from directory: /usr/lib64/dovecot/lda Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): Module loaded: /usr/lib64/dovecot/lda/lib10_quota_plugin.so Aug 5 15:12:25 dir-dev-pop01 dovecot: auth(default): master in: USER 1 emailspool service=deliver Aug 5 15:12:25 dir-dev-pop01 dovecot: auth(default): prefetch(emailspool): passdb didn't return userdb entries Aug 5 15:12:25 dir-dev-pop01 dovecot: auth(default): ldap(emailspool): user search: base=dc=hubdirect,dc=dev,dc=medplus,dc=com scope=subtree filter=(&(objectClass=DirectUser)(username=emailspool)(roles=*ROLE_EDGE_ EMAIL*)) fields=username Aug 5 15:12:25 dir-dev-pop01 dovecot: auth(default): master out: USER 1 emailspool user=emailspool uid=825 gid=825 Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): auth input: emailspool Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): auth input: user=emailspool Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): auth input: uid=825 Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): auth input: gid=825 Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): maildir: data=/home/hubdirect/emailspool/Maildir Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): maildir: root=/home/hubdirect/emailspool/Maildir, index=/home/hubdirect/emailspool/Maildir, control=, inbox= Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): msgid=12097075.28.1312571545112.JavaMail.zhou_y@yzhou-lp2: saved mail to INBOX
Thanks, Yan
Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
-----Original Message----- From: dovecot-bounces@dovecot.org [mailto:dovecot-bounces@dovecot.org] On Behalf Of Zhou, Yan Sent: Friday, August 05, 2011 4:24 PM To: dovecot@dovecot.org Subject: [Dovecot] DoveCot LDA prefetch fails with LDA, works with POP client
Hi there,
I am using DoveCot 1.0.7. I know it is real old, but we have to work with it. I have configured LDAP lookup with password prefetch in DoveCot. I can successfully receive emails through DoveCot, thus proving my password prefetch and user authentication are good.
The problem is when I use Postfix to deliver message to DoveCot via LDA. My postfix master.cf looks like this:
dovecot unix - n n - - pipe flags=Rhu user=hubdirect null_sender= argv=/usr/libexec/dovecot/deliver -e -f ${sender} -d ${user}
Given a message, Postfix looks up LDAP and find the user associated with the recipient address and delivers the message using LDA. LDAP logs indicates that Postfix is returning the right user.
The problem is that DoveCot complains "passdb did not return userdb entries", but I do not know which entries passdb failed to return. Here is what I have in dovecot-ldap.conf. I have tried different things in "user_attrs", DoveCot keeps complaining the same thing.
user_attrs = username=user user_filter = (&(objectClass=DirectUser)(username=%u)(roles=*ROLE_EDGE_EMAIL*)) pass_attrs =
username=user,password=password,username=userdb_user,usermaildirectory=
u serdb_mail,userhomedirectory=userdb_home,825=userdb_uid,825=userdb_gid pass_filter = (&(objectClass=DirectUser)(username=%u)(roles=*ROLE_EDGE_EMAIL*))
The documentation says LDA does not use prefetch, but the log seems to indicate otherwise. I clearly see the "service=deliver" is authenticating the user first, thus using password prefetch. Can someone clarify this?
Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): Loading modules from directory: /usr/lib64/dovecot/lda Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): Module loaded: /usr/lib64/dovecot/lda/lib10_quota_plugin.so Aug 5 15:12:25 dir-dev-pop01 dovecot: auth(default): master in: USER 1 emailspool service=deliver Aug 5 15:12:25 dir-dev-pop01 dovecot: auth(default): prefetch(emailspool): passdb didn't return userdb entries Aug 5 15:12:25 dir-dev-pop01 dovecot: auth(default): ldap(emailspool): user search: base=dc=hubdirect,dc=dev,dc=medplus,dc=com scope=subtree
filter=(&(objectClass=DirectUser)(username=emailspool)(roles=*ROLE_EDGE
_ EMAIL*)) fields=username Aug 5 15:12:25 dir-dev-pop01 dovecot: auth(default): master out: USER 1 emailspool user=emailspool uid=825 gid=825 Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): auth input: emailspool Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): auth input: user=emailspool Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): auth input: uid=825 Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): auth input: gid=825 Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): maildir: data=/home/hubdirect/emailspool/Maildir Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): maildir: root=/home/hubdirect/emailspool/Maildir, index=/home/hubdirect/emailspool/Maildir, control=, inbox= Aug 5 15:12:25 dir-dev-pop01 deliver(emailspool): msgid=12097075.28.1312571545112.JavaMail.zhou_y@yzhou-lp2: saved mail to INBOX
Thanks, Yan
I was able to get this working by the following attributes.
user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid
Thanks!
Yan
Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
participants (1)
-
Zhou, Yan