[Dovecot] INBOX protected foldername?
Hello,
have a little problem with folders with name INBOX created by Users.
Some Clients use a Prefix for their Folders. In our old setup (dovecot 1.2) it was possible to create a Folder INBOX in mbox-space with some Subfolders. These Subfolders of INBOX showed up in Mailclient at toplevel. Now we updatet to 2.1.7. In higher dovecot versions INBOX seems to be a kind of protected foldername. dovecot is not offering this folder in folderlist. If i rename it, the folder is available again. There are only a few users, so i could fix this manually. But how to explain this? I did not find a setting etc. which could explain this behaviour.
Our Config is pretty standard: mail_location is unchanged some dovecot versions we use: mail_location = mbox:~/mail:INBOX=/var/mail/%u
most of conf is out of the box and also used in older versions. only new is namespace inbox, but should also be default:
namespace inbox { inbox = yes }
Is there an explaination for this behaviour?
Thanks, Hajo
Le 18 juil. 2013 à 13:58, Hajo Locke a écrit :
Hello,
[...] In higher dovecot versions INBOX seems to be a kind of protected foldername. dovecot is not offering this folder in folderlist. If i rename it, the folder is available again. [...]
Is there an explaination for this behaviour?
Hello Hajo,
From RFC 3501:
The case-insensitive mailbox name INBOX is a special name reserved to
mean "the primary mailbox for this user on this server". The
interpretation of all other names is implementation-dependent.
IIRC, several changes have been brought to Dovecot's code wrt the handling of that "inbox" name.
HTH, Axel
Hello,
[...] In higher dovecot versions INBOX seems to be a kind of protected foldername. dovecot is not offering this folder in folderlist. If i rename it, the folder is available again. [...] Is there an explaination for this behaviour?
The case-insensitive mailbox name INBOX is a special name reserved to mean "the primary mailbox for this user on this server". The interpretation of all other names is implementation-dependent.
Its not about the INBOX itself in /var/mail, there are some clients like groupoffice which do their own foldermanagment and create a Folder INBOX on top-level in mailspace
Hiding user created folders with Name INBOX seems to be based on standard namespace config in 2.1.x In dovecot 2.1.7 we have in global:
mail_location = mbox:~/mail:INBOX=/var/mail/%u namespace inbox { inbox = yes }
This seems to be the default and leads to the problem that Folders with Name INBOX are hidden. Like suggested in http://wiki2.dovecot.org/Namespaces (Examples Mixed mbox and Maildir) i changed the standard namespace to:
namespace inbox { separator = / prefix = "#mbox/" location = mbox:~/mail:INBOX=/var/mail/%u inbox = yes hidden = yes list = no } namespace mbox { separator = / prefix = location = mbox:~/mail }
Because we are using mbox, i have to set up the 2nd namespace again with "location = mbox:~/mail". This works and Folders with Name INBOX are shown again. This namespace configuration looks a bit strange to me, but works. Is this a recommend way to do this? I dont want to get surprised by other behaviour.
Thanks, Hajo
On 6.8.2013, at 10.52, Hajo Locke hajo.locke@gmx.de wrote:
Its not about the INBOX itself in /var/mail, there are some clients like groupoffice which do their own foldermanagment and create a Folder INBOX on top-level in mailspace
Hiding user created folders with Name INBOX seems to be based on standard namespace config in 2.1.x In dovecot 2.1.7 we have in global:
mail_location = mbox:~/mail:INBOX=/var/mail/%u namespace inbox { inbox = yes }
This seems to be the default and leads to the problem that Folders with Name INBOX are hidden.
Are you talking about INBOX's children not being visible? That could be a bug in v2.1.7. INBOX itself always exists in top level.
Hello,
Are you talking about INBOX's children not being visible? That could be a bug in v2.1.7. INBOX itself always exists in top level. yes, exactly.subfolders of INBOX are hidden. I was confused at the first time because clients created own INBOX folders with subfolders and i misunderstood the situation. I could only make them visible with the 2 namespace solution from here: http://wiki2.dovecot.org/Namespaces (Mixed mbox and Maildir) This looks weird because its 2 times almost the same (mbox), but works. Should i keep this configuration or wait for a fix?
Thanks, Hajo
On 12.8.2013, at 20.33, Hajo Locke hajo.locke@gmx.de wrote:
Hello,
Are you talking about INBOX's children not being visible? That could be a bug in v2.1.7. INBOX itself always exists in top level. yes, exactly.subfolders of INBOX are hidden. I was confused at the first time because clients created own INBOX folders with subfolders and i misunderstood the situation. I could only make them visible with the 2 namespace solution from here: http://wiki2.dovecot.org/Namespaces (Mixed mbox and Maildir) This looks weird because its 2 times almost the same (mbox), but works. Should i keep this configuration or wait for a fix?
It's most likely fixed in a newer v2.1, which I think is available in Debian backports.
Hello,
Are you talking about INBOX's children not being isible? That could be a bug in v2.1.7. INBOX itself always exists in top level. yes, exactly.subfolders of INBOX are hidden. I was confused at the first time because clients created own INBOX folders with subfolders and i misunderstood the situation. I could only make them visible with the 2 namespace solution from here: http://wiki2.dovecot.org/Namespaces (Mixed mbox and Maildir) This looks weird because its 2 times almost the same (mbox), but works. Should i keep this configuration or wait for a fix?
It's most likely fixed in a newer v2.1, which I think is available in Debian backports.
In official repos currently i found nothing newer then 2.1.7. This version is widely used in ubuntu versions. There are some repos outside of ubuntu with newer versions but i try to avoid this. Including untrusted code from unknown repos can lead to later surprises... Currently i spent a lot of time with 2.1.7. We included your userdb-import patches (you remember) and created some own patches to make xlist and special-use work at the same time by individual usersettings. I built individual packages for our 3 systemtypes and had updated already some thousand machines as we noticed this problem and did a rollback
Is this fix a particular sequence in later code? so i could make an additional patch.
Otherwise i tend to keep this config, even if it looks unusual. Do you see a problem when using something like this:
namespace inbox { prefix = "#mbox/" location = mbox:~/mail:INBOX=/var/mail/%u inbox = yes hidden = yes list = no } namespace mboxes { location = mbox:~/mail:INBOX=/var/mail/%u }
If you approve this config and it will not lead to other problems i would keep it. else i have to start at the beginning again...
Thanks, Hajo
Since 2.1.17 fixes a lot of bugs of 2.1.7, I would propose you to open a bug report on the dovecot package in bugs.debian.org and list some of the bugs which have been fixed in the meantime. The easiest way to do so is to use the "reportbug" tool in Debian.
At least then there is some hope to get a known-to-be-stable release into some of the next Debian (and Ubuntu) releases.
Regards Daniel
Hello,
Since 2.1.17 fixes a lot of bugs of 2.1.7, I would propose you to open a bug report on the dovecot package in bugs.debian.org and list some of the bugs which have been fixed in the meantime. The >> easiest way to do so is to use the "reportbug" tool in Debian.
hmm, upgrading should fix some older errors but in my case i got new ones.
i went to 2.1.17 from http://xi.rename-it.nl/debian/ and did my changes to source debs and compiled my packages. At the moment i update from 2.1.7 to 2.1.17 my userdb-settings in mysql-db are not working any more.
passdb and userdb directives are like this:
passdb { args = /etc/dovecot/dovecot-sql.conf driver = sql } userdb { driver = prefetch }
namespace is this:
namespace inbox { inbox = yes }
PasswordQuery with prefetching userdb is this:
password_query = SELECT inbox
as user
, password
, home
as
userdb_home, uid
AS userdb_uid, gid
AS userdb_gid, userdb_import
AS
userdb_userdb_import FROM mail_users
WHERE login
= '%u' AND active
='Y'
I tested also without prefetching -> same result.
In mysql in field userdb_import i have my TAB-separated XLIST Settings: namespace/inbox/mailbox=Sent namespace/inbox/mailbox/Sent/name=Sent namespace/inbox/mailbox/Sent/auto=subscribe namespace/inbox/mailbox/Sent/special_use=\Sent namespace/inbox/mailbox=Drafts namespace/inbox/mailbox/Drafts/name=Drafts namespace/inbox/mailbox/Drafts/auto=subscribe namespace/inbox/mailbox/Drafts/special_use=\Drafts namespace/inbox/mailbox=Trash namespace/inbox/mailbox/Trash/name=Trash namespace/inbox/mailbox/Trash/auto=subscribe namespace/inbox/mailbox/Trash/special_use=\Trash namespace/inbox/mailbox=Spam namespace/inbox/mailbox/Spam/name=Spam namespace/inbox/mailbox/Spam/auto=subscribe namespace/inbox/mailbox/Spam/special_use=\Junk
The 2.1.7 correct works:
Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox=Drafts Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox=Sent Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox=Spam Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox=Trash Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Drafts/auto=subscribe Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Drafts/name=Entwürfe Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Drafts/special_use=\Drafts Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Sent/auto=subscribe Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Sent/name=Gesendet Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Sent/special_use=\Sent Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Spam/auto=subscribe Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Spam/name=Spam Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Spam/special_use=\Junk Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Trash/auto=subscribe Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Trash/name=Papierkorb Aug 15 15:26:25 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Trash/special_use=\Trash
After upgrading to 2.1.17 the debuglog says:
Aug 15 15:24:47 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox=Spam Aug 15 15:24:47 myhostname dovecot: imap: Debug: Unknown userdb setting: plugin/namespace/inbox/mailbox/Drafts/auto=subscribe Aug 15 15:24:47 myhostname dovecot: imap: Debug: Unknown userdb setting: plugin/namespace/inbox/mailbox/Drafts/name=Entwürfe Aug 15 15:24:47 myhostname dovecot: imap: Debug: Unknown userdb setting: plugin/namespace/inbox/mailbox/Drafts/special_use=\Drafts Aug 15 15:24:47 myhostname dovecot: imap: Debug: Unknown userdb setting: plugin/namespace/inbox/mailbox/Sent/auto=subscribe Aug 15 15:24:47 myhostname dovecot: imap: Debug: Unknown userdb setting: plugin/namespace/inbox/mailbox/Sent/name=Gesendet Aug 15 15:24:47 myhostname dovecot: imap: Debug: Unknown userdb setting: plugin/namespace/inbox/mailbox/Sent/special_use=\Sent Aug 15 15:24:47 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Spam/auto=subscribe Aug 15 15:24:47 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Spam/name=Spam Aug 15 15:24:47 myhostname dovecot: imap: Debug: Added userdb setting: namespace/inbox/mailbox/Spam/special_use=\Junk Aug 15 15:24:47 myhostname dovecot: imap: Debug: Unknown userdb setting: plugin/namespace/inbox/mailbox/Trash/auto=subscribe Aug 15 15:24:47 myhostname dovecot: imap: Debug: Unknown userdb setting: plugin/namespace/inbox/mailbox/Trash/name=Papierkorb Aug 15 15:24:47 myhostname dovecot: imap: Debug: Unknown userdb setting: plugin/namespace/inbox/mailbox/Trash/special_use=\Trash
just as i use more then one setting in userdb_import field, then the most of the setting are not understood. downgrade to 2.1.7 -> it works; upgrade to 2.1.7 with same mysql and same conf and it fails.
I can remember that some patches are made from timo to make this userdb work in former versions. (the beginning: http://dovecot.org/list/dovecot/2013-March/089209.html) i cant find any configproblem on my side. Are still some patches needed? The patches i used for 2.1.7 dont fit for 2.1.17
What to do now?
Thanks, Hajo
Hello,
hmm, upgrading should fix some older errors but in my case i got new ones.
i found the problem. it is a conf problem.
in 2.1.7 it was enough to set the namespace once and set special_use directives later in userdb.
now in 2.1.17 you have to set up also the special_use directives in conf and overwrite them with settings from userdb. seems that 2.1.17 is not creating this settings in internal table if they are missing in conf. is this expected?
Thanks, Hajo
On 16.8.2013, at 12.21, Hajo Locke hajo.locke@gmx.de wrote:
Hello,
hmm, upgrading should fix some older errors but in my case i got new ones.
i found the problem. it is a conf problem.
in 2.1.7 it was enough to set the namespace once and set special_use directives later in userdb.
now in 2.1.17 you have to set up also the special_use directives in conf and overwrite them with settings from userdb. seems that 2.1.17 is not creating this settings in internal table if they are missing in conf. is this expected?
I think it works if you return:
namespace/inbox/mailbox=Sent Drafts Trash Spam
instead of returning each one separately.
participants (4)
-
Axel Luttgens
-
Daniel Parthey
-
Hajo Locke
-
Timo Sirainen