[Dovecot] Dovecot 2.2.2: doveadm user doesn't honor -x option
Hello,
Considering a user_query similar to this one:
SELECT ... FROM ... WHERE CASE '%s' WHEN 'lmtp' THEN ...
and issuing following command:
doveadm user -x service=lmtp someuser@example.com
the log shows:
SELECT ... FROM ... WHERE CASE 'doveadm' WHEN 'lmtp' THEN ...
and the query of course fails.
The same config with Dovecot 2.1.16 yields expected results.
- This is more a question.
Issuing above command first writes this to the log:
prefetch(someuser@example.com): passdb didn't return userdb entries, trying the next userdb
Is there really an attempt to make use of the prefetch database? If yes, under which circumstances could it succeed?
TIA, Axel
On 6.6.2013, at 21.51, Axel Luttgens AxelLuttgens@swing.be wrote:
Hello,
- Considering a user_query similar to this one:
SELECT ... FROM ... WHERE CASE '%s' WHEN 'lmtp' THEN ...
and issuing following command:
doveadm user -x service=lmtp someuser@example.com
the log shows:
SELECT ... FROM ... WHERE CASE 'doveadm' WHEN 'lmtp' THEN ...
and the query of course fails.
Fixed: http://hg.dovecot.org/dovecot-2.2/rev/c290383e60da
The same config with Dovecot 2.1.16 yields expected results.
v2.1 worked a bit differently by returning only the userdb info and skipping the dovecot.conf settings. Giving -u parameter to doveadm user uses the old way, and the service works also there.
- This is more a question.
Issuing above command first writes this to the log:
prefetch(someuser@example.com): passdb didn't return userdb entries, trying the next userdb
Is there really an attempt to make use of the prefetch database?
Yes.
If yes, under which circumstances could it succeed?
Never with only a userdb lookup. But it's generic code. I guess the debug log entry could be hidden if it disturbs people too much..
Le 16 juin 2013 à 19:19, Timo Sirainen a écrit :
[...]
Hello Timo,
Thanks: just tried with 2.2.3, and it worked as expected.
The same config with Dovecot 2.1.16 yields expected results.
v2.1 worked a bit differently by returning only the userdb info and skipping the dovecot.conf settings. Giving -u parameter to doveadm user uses the old way, and the service works also there.
Now that you wrote about that -u option, I vaguely recalled about it, and indeed found this one in the ChangeLog:
doveadm user: Removed -m parameter and made it default. Added -u for
old functionality.
-u meaning "userdb lookup only".
[...]
Is there really an attempt to make use of the prefetch database?
Yes.
If yes, under which circumstances could it succeed?
Never with only a userdb lookup. But it's generic code. I guess the debug log entry could be hidden if it disturbs people too much..
Well... there's at least one guy who always gets trapped by such entries. ;-)
Best Regards, Axel
participants (2)
-
Axel Luttgens
-
Timo Sirainen