try changing your config so that it reads
passdb passb1 {
}
passdb passdb2 {
}
passdb passdb3 {
}
and try again. this should make it more clear what happens.
Aki
> On 01/08/2024 14:51 EEST zaxwat93--- via dovecot <[email protected]> wrote:
>
>
> got a problem when configured passdb with username_filter — looks like the
> option doesn't work
> OS: FreeBSD 13 and 14. Dovecot version: 2.3.21
> Part of config:
> passdb {
> args = /usr/local/bin/php /usr/local/dovecot/bin/checkpassword.php
> driver = checkpassword
> }
> passdb {
> args = /usr/local/bin/php /usr/local/dovecot/bin/checkpassword.php
> driver = checkpassword
> username_filter = [email protected]
> default_fields = domain=local.one
> override_fields = [email protected]
> }
> passdb {
> args = /usr/local/bin/php /usr/local/dovecot/bin/checkpassword.php
> driver = checkpassword
> username_filter = [email protected]
> default_fields = domain=local.one
> override_fields = [email protected]
> }
>
> When I try command "doveadm auth test [email protected]" and enter a
> password of user1 — it works as planned — change [email protected]
> to [email protected] check it's password and override user to
> [email protected]
> But when I try "doveadm auth test [email protected]" — it also change
> [email protected] to [email protected], and after password check — override
> it to [email protected]
>
> Debug logs, when I try "doveadm auth test [email protected]":
>
> Aug 1 11:01:03 auth: Debug: Loading modules from directory:
> /usr/local/lib/dovecot/auth
> Aug 1 11:01:03 auth: Debug: Module loaded:
> /usr/local/lib/dovecot/auth/lib20_auth_var_expand_crypt.so
> Aug 1 11:01:03 auth: Debug: Read auth token secret from
> /var/run/dovecot/auth-token-secret.dat
> Aug 1 11:01:03 auth: Debug: passwd-file
> /usr/local/etc/dovecot.users.list:Read 7 users in 0 secs
> Aug 1 11:01:03 auth: Debug: auth client connected (pid=0)
> Aug 1 11:01:03 auth: Debug: client in: AUTH 1 PLAIN
> service=doveadm debug resp=<hidden>
> Aug 1 11:01:03 auth: Debug: checkpassword([email protected]): Performing
> passdb lookup
> Aug 1 11:01:03 auth: Debug: checkpassword([email protected]): execute:
> /usr/local/bin/php /usr/local/dovecot/bin/checkpassword.php
> /usr/local/libexec/dovecot/checkpassword-reply
> Aug 1 11:01:03 auth: Debug: checkpassword([email protected]): Received
> input:
> Aug 1 11:01:03 auth: Debug: checkpassword([email protected]):
> exit_status=1
> Aug 1 11:01:03 auth: checkpassword([email protected]): Login failed
> (status=1)
> Aug 1 11:01:03 auth: Debug: checkpassword([email protected]): Finished
> passdb lookup
> Aug 1 11:01:03 auth: Debug: checkpassword([email protected]): Performing
> passdb lookup
> Aug 1 11:01:03 auth: Debug: checkpassword([email protected]): username
> changed [email protected] -> [email protected]
> Aug 1 11:01:03 auth: Debug: checkpassword([email protected]): execute:
> /usr/local/bin/php /usr/local/dovecot/bin/checkpassword.php
> /usr/local/libexec/dovecot/checkpassword-reply
> Aug 1 11:01:03 auth: Debug: checkpassword([email protected]): Received input:
> [email protected] userdb_home=/var/spool/mail/ userdb_uid=dovecot
> userdb_gid=dovecot
> Aug 1 11:01:03 auth: Debug: checkpassword([email protected]): exit_status=0
> Aug 1 11:01:03 auth: Debug: checkpassword([email protected]): username changed
> [email protected] -> [email protected]
> Aug 1 11:01:03 auth: Debug: checkpassword([email protected]): Finished
> passdb lookup
> Aug 1 11:01:03 auth: Debug: auth([email protected]): Auth request finished
> Aug 1 11:01:03 auth: Debug: client passdb out: OK 1
> [email protected] [email protected]
>
> I've checked sources and find in " core/src/auth/auth-request.c (from line
> 617) " code that check username_filter and should send "skipping passdb:
> username filtered" message in debug, but it doesn't do it.
>
> Is it a bug or I've missed something in setup?
> _______________________________________________
> dovecot mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]