[Dovecot] dovecot ldap search result ordering?
I use openLDAP as dovecot pass/user db. here is main part of dovecot-ldap.conf:
pass_attrs = mail=user, uid=userdb_home=/home/xadmin/%d/%$,userPassword=password pass_filter = (&(objectClass=posixAccount)(uid=%u)) default_pass_scheme = SSHA
user_attrs = mail=user, uid=home=/home/xadmin/%d/%$ user_filter = (&(objectClass=posixAccount)(|(mail=%u)(mailAlias=%u)))
It works fine, but some account failed to get their domain in pass_attrs. I check the log. when it success, the result order is "mail, uid, userPassword" when it failed, the order is "userPassword, uid, mail"
we just use a username to login. I think dovecot cant get the domain before username changed to "username@domain". So can dovecot sort the result order and How?
-- 多情卻似總無情, 唯覺尊前笑不成。 蠟燭有心還惜別, 替人垂淚到天明。
On Sat, 2010-06-26 at 14:53 +0800, chasye wrote:
It works fine, but some account failed to get their domain in pass_attrs. I check the log. when it success, the result order is "mail, uid, userPassword" when it failed, the order is "userPassword, uid, mail"
You didn't mention what Dovecot version you're using. Anyway, I guess this is fixed by: http://hg.dovecot.org/dovecot-1.2/rev/a3e4af3df83d
于 Mon, 28 Jun 2010 21:22:36 +0100 Timo Sirainen tss@iki.fi 写道:
On Sat, 2010-06-26 at 14:53 +0800, chasye wrote:
It works fine, but some account failed to get their domain in pass_attrs. I check the log. when it success, the result order is "mail, uid, userPassword" when it failed, the order is "userPassword, uid, mail"
You didn't mention what Dovecot version you're using. Anyway, I guess this is fixed by: http://hg.dovecot.org/dovecot-1.2/rev/a3e4af3df83d
I use Dovecot 1.2.11 from debian. May be I shall try a newer version. thanks from you reply
-- 多情卻似總無情, 唯覺尊前笑不成。 蠟燭有心還惜別, 替人垂淚到天明。
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Sat, 26 Jun 2010, chasye wrote:
pass_attrs = mail=user, uid=userdb_home=/home/xadmin/%d/%$,userPassword=password pass_filter = (&(objectClass=posixAccount)(uid=%u)) default_pass_scheme = SSHA
user_attrs = mail=user, uid=home=/home/xadmin/%d/%$ user_filter = (&(objectClass=posixAccount)(|(mail=%u)(mailAlias=%u)))
It works fine, but some account failed to get their domain in pass_attrs. I check the log. when it success, the result order is "mail, uid, userPassword" when it failed, the order is "userPassword, uid, mail"
we just use a username to login. I think dovecot cant get the domain before username changed to "username@domain". So can dovecot sort the result
I guess you have to drop the uid=userdb_home and rely on the second query.
Regards,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBTCxNrb+Vh58GPL/cAQIydAf/fB07yAHzzJQdeXNutnA8NEikLyJ8oevL Vblt2clSEWM8tkTJK42EC9916lOhKA/EOmGvuRjgSfoal1AJlVTptiQjxCaELeS6 5afwC2aEvvIYRKOaw42S98TYOzr5V0HU3QcxQmlMRxpB9cESzIG5Pw6Z9Ol52whJ HJd+3MO29LUdHcgn8yxxsuk+VowPn8CL4WK0WiDhpLFMc2z5Z6SkthqyGOOAtvkj y35pAiTBx/DiOPEtU+VLu6IRddtL4GYYnMvAn05b63sZO9e1CquVpbr5Qb3q2I52 w5HFeqYKqH9zBZD3xdYxUdrSSK8tU5WfjUYYcnZzQlYv5oeWYS3NaQ== =tbno -----END PGP SIGNATURE-----
于 Thu, 1 Jul 2010 10:11:23 +0200 (CEST) Steffen Kaiser skdovecot@smail.inf.fh-brs.de 写道:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Sat, 26 Jun 2010, chasye wrote:
pass_attrs = mail=user, uid=userdb_home=/home/xadmin/%d/%$,userPassword=password pass_filter = (&(objectClass=posixAccount)(uid=%u)) default_pass_scheme = SSHA
user_attrs = mail=user, uid=home=/home/xadmin/%d/%$ user_filter = (&(objectClass=posixAccount)(|(mail=%u)(mailAlias=%u)))
It works fine, but some account failed to get their domain in pass_attrs. I check the log. when it success, the result order is "mail, uid, userPassword" when it failed, the order is "userPassword, uid, mail"
we just use a username to login. I think dovecot cant get the domain before username changed to "username@domain". So can dovecot sort the result
I guess you have to drop the uid=userdb_home and rely on the second query.
Regards,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBTCxNrb+Vh58GPL/cAQIydAf/fB07yAHzzJQdeXNutnA8NEikLyJ8oevL Vblt2clSEWM8tkTJK42EC9916lOhKA/EOmGvuRjgSfoal1AJlVTptiQjxCaELeS6 5afwC2aEvvIYRKOaw42S98TYOzr5V0HU3QcxQmlMRxpB9cESzIG5Pw6Z9Ol52whJ HJd+3MO29LUdHcgn8yxxsuk+VowPn8CL4WK0WiDhpLFMc2z5Z6SkthqyGOOAtvkj y35pAiTBx/DiOPEtU+VLu6IRddtL4GYYnMvAn05b63sZO9e1CquVpbr5Qb3q2I52 w5HFeqYKqH9zBZD3xdYxUdrSSK8tU5WfjUYYcnZzQlYv5oeWYS3NaQ== =tbno -----END PGP SIGNATURE-----
I have tried this, but if user has mailAlias from other domain, this is still not work as expected. Mails will go to orig domain directory. May be It's fixed in newer version as Timo said. I will try a newer version.
thank for your reply
-- 多情卻似總無情, 唯覺尊前笑不成。 蠟燭有心還惜別, 替人垂淚到天明。
participants (3)
-
chasye
-
Steffen Kaiser
-
Timo Sirainen