strange cache behavior

Maciej Milaszewski maciej.milaszewski at iq.pl
Thu Oct 7 18:50:50 EEST 2021


Hi
I Migrate user from ldap to mysql (director+nodes) (2.2.36.4)

All works fine but when I turn on debbug auth I get "cache differences "

look:
dovecot6 (lmysql)run:
 
#doveadm user mx8 at domain.ltd
field    value
user    domain.ltd_mx8
uid    300
gid    300
home    /vmail2/na/domain.ltd_mx8
mail   
maildir:~/Maildir:INDEX=/var/dovecot_indexes/vmail2/na/domain.ltd_mx8
quota_rule    *:bytes=10485760

In second time (via cache) I get:

#doveadm user mx8 at domain.ltd
field    value
uid    300
gid    300
home    /vmail2/na/domain.ltd_mx8
mail   
maildir:~/Maildir:INDEX=/var/dovecot_indexes/vmail2/na/domain.ltd_mx8
quota_rule    *:bytes=10485760

cache not give me "user    domain.ltd_mx8" value


In ldap every time I get this same

I try debbug and i found difference in 2 and 3 line:

mysql:
Oct  7 16:42:04 dovecot6 dovecot: auth: Debug: master in:
USER#0111#011mx8 at domain.ltd#011service=doveadm#011debug
Oct  7 16:42:04 dovecot6 dovecot: auth: Debug:
sql(mx8 at natan-test.iq.pl): userdb cache hit:
home=/vmail2/na/domain.ltd_mx8#011quota_rule=*:bytes=10485760
Oct  7 16:42:04 dovecot6 dovecot: auth: Debug: userdb out:
USER#0111#011mx8 at domain.ltd#011home=/vmail2/na/natan-test.iq.pl_mx8_natan-test#011quota_rule=*:bytes=10485760

in ldap:
Oct  7 16:45:31 dovecot5 dovecot: auth: Debug: master in:
USER#0111#011mx8 at domain.ltd#011service=doveadm#011debug
Oct  7 16:45:31 dovecot5 dovecot: auth: Debug:
ldap(mx8 at natan-test.iq.pl): userdb cache hit:
home=/vmail2/na/domain.ltd_mx8#011quota_rule=*:bytes=10485760#011user=domain.ltd_mx8
Oct  7 16:45:31 dovecot5 dovecot: auth: Debug:
ldap(mx8 at natan-test.iq.pl): username changed mx8 at domain.ltd-> domain.ltd_mx8
Oct  7 16:45:31 dovecot5 dovecot: auth: Debug: userdb out:
USER#0111#011domain.ltd_mx8#011home=/vmail2/na/natan-test.iq.pl_mx8_natan-test#011quota_rule=*:bytes=10485760


first query witchout cache:

ldap
Oct  7 16:45:21 dovecot5 dovecot: auth: Debug: userdb out:
USER#0111#011domain.ltd_mx8#011home=/vmail2/na/domain.ltd_mx8#011quota_rule=*:bytes=10485760

mysql
Oct  7 16:41:34 dovecot6 dovecot: auth: Debug: userdb out:
USER#0111#011domain.ltd_mx8#011home=/vmail2/na/domain.ltd_mx8#011quota_rule=*:bytes=10485760

And I dont known where is a problem ? maybe in the cache setting ?

All dovecot hava this sam config (outside of the settings about auth query)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://dovecot.org/pipermail/dovecot/attachments/20211007/d629b1ef/attachment-0001.sig>


More information about the dovecot mailing list