namespace directives from userdb not being applied

Brendan Braybrook brendan at tucows.com
Thu Jul 14 01:56:37 UTC 2022


hi all,

i'm having a strange issue. i have a few dovecot instances running:

1- debian 10 with debian's dovecot-core 1:2.3.4.1-5+deb10u5
2- debian 10 with debian's dovecot-core 1:2.3.4.1-5+deb10u6
3- debian 11 with dovecot's dovecot-core 2:2.3.19.1-2+debian11

for all these, i've just been testing with a static userdb (ignore if
the login user was different; they all had the same userdb data..
various different passdb configs were tried (none do any userdb
prefetching):

userdb {
  driver = static
  args =
mail=maildir:/mail/mailstore03/492/177/b at b.com/:INDEX=/mail/index03/492/177/b at b.com/
home=/mail/mailstore03/492/177/b at b.com/ namespace=inbox,share
namespace/inbox/separator=/ namespace/share/separator=/
namespace/share/prefix=boop/
}

instance #2 and #3 don't seem to pass all the namespace directives i'm
passing through to the imap process.

(i originally found it happening with a lua userdb script then noticed
it with a dict userdb, but the simpler static userdb still shows it
happening so i don't think it's related to the different userdb
mechanisms themselves)

debug looks like:

auth: Debug: master userdb out: USER	3466461185	b at b.com
mail=maildir:/mail/mailstore03/492/177/b at b.com/:INDEX=/mail/index03/492/177/b at b.com/
home=/mail/mailstore03/492/177/b at b.com/	namespace=inbox,share
namespace/inbox/separator=/	namespace/share/separator=/
namespace/share/prefix=boop/	auth_mech=PLAIN
auth_token=bcdb366d56f4fceee83775a1b28ca89ccdf881fd
script-login(b at b.com)<56895><>: Debug: Added userdb setting:
mail=maildir:/mail/mailstore03/492/177/b at b.com/:INDEX=/mail/index03/492/177/b at b.com/
script-login(b at b.com)<56895><>: Debug: Added userdb setting:
namespace=inbox,share
script-login(b at b.com)<56895><>: Debug: Added userdb setting:
namespace/inbox/separator=/
script-login(b at b.com)<56895><>: Debug: Added userdb setting:
namespace/share/prefix=boop/
script-login(b at b.com)<56895><>: Debug: Added userdb setting:
namespace/share/separator=/
imap(b at b.com)<56894><9mFyornjaMcKyAUI>: Debug: Added userdb setting:
mail=maildir:/mail/mailstore03/492/177/b at b.com/:INDEX=/mail/index03/492/177/b at b.com/
imap(b at b.com)<56894><9mFyornjaMcKyAUI>: Debug: Added userdb setting:
namespace=inbox,share
imap(b at b.com)<56894><9mFyornjaMcKyAUI>: Debug: Namespace inbox:
type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes,
subscriptions=yes
location=maildir:/mail/mailstore03/492/177/b at b.com/:INDEX=/mail/index03/492/177/b at b.com/
imap(b at b.com)<56894><9mFyornjaMcKyAUI>: Debug: Namespace : type=private,
prefix=, sep=, inbox=no, hidden=no, list=yes, subscriptions=yes
location=maildir:/mail/mailstore03/492/177/b at b.com/:INDEX=/mail/index03/492/177/b at b.com/

the script-login task notes that these userdb settings are being added:
namespace=inbox,share
namespace/inbox/separator=/
namespace/share/prefix=boop/
namespace/share/separator=/

but the imap task only notes one:
namespace=inbox,share

both of these two instances end up getting an error because the imap
task didn't pick up the prefix:
Error: namespace configuration error: Duplicate namespace prefix: ""

instance #1 behaves differently. it's script-login task debug is the
same, but the imap debug notes:
imap(bigip-imap at nagios.tucows.com)<2146><s3ctO7njd6cKBS39>: Debug: Added
userdb setting:
mail=maildir:/mail/mailstore03/492/177/b at b.com/:INDEX=/mail/index03/492/177/b at b.com/
imap(bigip-imap at nagios.tucows.com)<2146><s3ctO7njd6cKBS39>: Debug: Added
userdb setting: namespace=inbox,share
imap(bigip-imap at nagios.tucows.com)<2146><s3ctO7njd6cKBS39>: Debug: Added
userdb setting: namespace/inbox/separator=/
imap(bigip-imap at nagios.tucows.com)<2146><s3ctO7njd6cKBS39>: Debug:
tc_empty_notify_plugin init
imap(bigip-imap at nagios.tucows.com)<2146><s3ctO7njd6cKBS39>: Debug:
Namespace inbox: type=private, prefix=, sep=/, inbox=yes, hidden=no,
list=yes, subscriptions=yes
location=maildir:/mail/mailstore03/492/177/b at b.com/:INDEX=/mail/index03/492/177/b at b.com/
imap(bigip-imap at nagios.tucows.com)<2146><s3ctO7njd6cKBS39>: Debug:
Namespace : type=private, prefix=, sep=, inbox=no, hidden=no, list=yes,
subscriptions=yes
location=maildir:/mail/mailstore03/492/177/b at b.com/:INDEX=/mail/index03/492/177/b at b.com/

on this one, the imap task notes that it added ALL the namespace
directives, and consequently doesn't have any namespace prefix collisions.

the difference between 1:2.3.4.1-5+deb10u5 and 1:2.3.4.1-5+deb10u6
doesn't seem that great, and the bug tracker for it doesn't indicate
anything around userdb would be patched
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970386)

but the problem still seems to exist in 2.3.19 - can anyone else see the
same thing happening with the current builds?

thanks!
-brendan


More information about the dovecot mailing list