1 (edited by huserib 2013-03-15 21:35:32)

Topic: Doveadm failing to detect users with LDAP

==== ==== Required information ====
- iRedMail version: 0.8.3
- Backend: LDAP
- CentOS 6.4
====

First of all, great work.  I look forward to getting this working and transitioning to your product once the kinks are worked out.  The panel looks like it will be well worth the cost.  I've set up a temporary server with 2 users and the MTA and web-stuff is working fine, can authenticate and send/receive mail just fine.  (I haven't looked at Roundcube in years and I'm pretty impressed).  So my only remaining hurdle is to get doveadm to work with the iRedMail LDAP schema, but it seems to fail on finding users. 

For example, the command:

doveadm mailbox list -A

returns:

doveadm(postmaster@example.com): Info: User no longer exists, skipping
doveadm(test@example.com): Info: User no longer exists, skipping

while the command:

doveadm mailbox list -u test@example.com

returns:

doveadm(test@example.com): Fatal: User doesn't exist

Here are the relevant logs.  It seems to be connecting to the database just fine, but honestly I'm little confused about why it's not working.  From the logs, doveadmn is finding the two users.  And ideas?  Does it have something to do with the filter enabledService=doveadm ? I don't think it should since it looks like the base filter is just looking for the; mail, enabled, and active attributes... but who knows.  It just seems like doveadm -A finds the users but skips them while doveadm -u doesn't find the user.

============doveadm mailbox list -A===============
Mar 15 12:40:06 auth-worker: Debug: ldap: iterate: base=o=domains,dc=example,dc=com scope=subtree filter=(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)) fields=mailMar 15 12:40:06 auth-worker: Debug: ldap(?):
Mar 15 12:40:06 auth-worker: Debug: ldap(?): result: mail(user)=postmaster@example.com
Mar 15 12:40:06 auth-worker: Debug: ldap(?): result: mail(user)=test@example.com
Mar 15 12:40:06 auth: Debug: master in: USER    2       postmaster@example.com  service=doveadm
Mar 15 12:40:06 auth: Debug: ldap(postmaster@example.com): user search: base=o=domains,dc=example,dc=com scope=subtree filter=(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=doveadm)(|(mail=postmaster@example.com)(&(enabledService=shadowaddress)(shadowAddress=postmaster@example.com)))) fields=mail,homeDirectory,mailQuota
Mar 15 12:40:06 auth: Info: ldap(postmaster@example.com): unknown user
Mar 15 12:40:06 auth: Debug: master out: NOTFOUND       2
Mar 15 12:40:06 auth: Debug: master in: USER    3       test@example.com     service=doveadm
Mar 15 12:40:06 auth: Debug: ldap(test@example.com): user search: base=o=domains,dc=example,dc=com scope=subtree filter=(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=doveadm)(|(mail=test@example.com)(&(enabledService=shadowaddress)(shadowAddress=test@example.com)))) fields=mail,homeDirectory,mailQuota
Mar 15 12:40:06 auth: Info: ldap(test@example.com): unknown user
Mar 15 12:40:06 auth: Debug: master out: NOTFOUND       3

=========doveadm mailbox list -u test@example.com=================
Mar 15 12:57:56 auth: Debug: master in: USER    1       test@example.com     service=doveadm
Mar 15 12:57:56 auth: Debug: ldap(test@example.com): user search: base=o=domains,dc=example,dc=com scope=subtree filter=(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=doveadm)(|(mail=test@example.com)(&(enabledService=shadowaddress)(shadowAddress=test@example.com)))) fields=mail,homeDirectory,mailQuota
Mar 15 12:57:56 auth: Info: ldap(test@example.com): unknown user
Mar 15 12:57:56 auth: Debug: master out: NOTFOUND       1

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Doveadm failing to detect users with LDAP

huserib wrote:

From the logs, doveadmn is finding the two users.  And ideas?  Does it have something to do with the filter enabledService=doveadm ?

The root cause is "enabledService=doveadm". Doveadm quires this attribute and value, so please add it for all mail users.
This is mentioned in iRedMail upgrade tutorial (0.7.4 -> 0.8.0) below, so you can use the script mentioned in tutorial to add this attribute/value for all users:
http://iredmail.org/wiki/index.php?titl … by_Doveadm

May i know how you add mail users? Both iRedMail scripts (tools/create_mail_user_*) and iRedAdmin should add this for you automatically.

3

Re: Doveadm failing to detect users with LDAP

I am having the same issue.

I have created several users through iredadmin, the only user to have the "doveadm" entry was the postmaster initially created by the setup script.