subscription, dots and subscribe to shared folder.
Hello;
We were able to set up shared folders in a cluster (using dovecot as proxy on dedicated front-end servers, without using director) by following https://doc.dovecot.org/configuration_manual/shared_mailboxes/cluster_setup/.
Here is our related conf on imap farms (dovecot v2.3.16 on Almalinux):
namespaces:
mail_location = maildir:~/Maildir
namespace default { inbox = yes location = prefix = separator = / }
namespace shared { list = children location = imapc:~/shared/%%u:INDEXPVT=~/shared-pvt/%%u prefix = shared/%%u/ separator = / subscriptions = no type = shared }
imapc settings:
imapc_features = fetch-bodystructure fetch-headers rfc822.size search modseq acl delay-login imapc_host = XXXXXX imapc_master_user = %{user} imapc_password = XXXXXX imapc_port = XXXXXX
passdb { args = password=#hidden_use-P_to_show# userdb_namespace/shared/disabled=yes userdb_acl_user=%{auth_user} allow_nets=XXXXX/XX driver = static master = yes } dict { acl-mysql = mysql:/etc/dovecot/conf.d/dovecot-dict-sql.conf.ext }
This way, a folder is created under ~/ : shared & shared-pvt :
When user A shares a folder with B, B will find ~/shared/userA/sharedfolder
I should mention that the user authentication (backend: mysql) uses the full email address as we are in a multi-tenant context.
So the folder looks like ~/shared/usera@domain.tld/folder
Since then, everything works perfectly, we can share and see the shared folders in the webmail (SOGo).
Unfortunately, accessing these folders through an imap client (tested on Thunderbird and MSOutlook) is impossible because the subscription fails (the folder is listed, but the subscription doesn't seem to do anything). I could not find any relevant logs but I was able to confirm on the command line: I am able to view folder with LIST, subscribe with an "OK" output, but the folder is not listed with LSUB.
So I could see that the subscribtion file in maildir shows incorrect entries:
V 2 Sent Trash Drafts Junk shared/testuser1@sub domain tld/INBOX/folder
The dots in the folder names are replaced by tabs.
I was able to recover things by editing the file as follows:
Sent Trash Drafts Junk shared/testuser1@sub.domain.tld/INBOX/folder
This means that Maildir++ and V2 subscription can't handle dots in folders.
I found a previous discussion: https://dovecot.org/pipermail/dovecot/2021-January/121233.html But the final advice can't be applied on our side: problem and totally breaks the access to shared folders.
- changing LAYOUT to FS is not possible for us
- we have already migrated the dot separator to slash
- changing the layout only for shared namespaces does not solve the
Thanks a lot for your advice
Best regards
Julien
On 02/03/2023 16:21 EET Julien Nadal julien+dovecotnl@mujik.fr wrote:
Hello; We were able to set up shared folders in a cluster (using dovecot as proxy on dedicated front-end servers, without using director) by following https://doc.dovecot.org/configuration_manual/shared_mailboxes/cluster_setup/.
Here is our related conf on imap farms (dovecot v2.3.16 on Almalinux): namespaces: mail_location = maildir:~/Maildir
namespace default { inbox = yes location = prefix = separator = / } namespace shared { list = children location = imapc:~/shared/%%u:INDEXPVT=~/shared-pvt/%%u prefix = shared/%%u/ separator = / subscriptions = no type = shared }
imapc settings:
imapc_features = fetch-bodystructure fetch-headers rfc822.size search modseq acl delay-login imapc_host = XXXXXX imapc_master_user = %{user} imapc_password = XXXXXX imapc_port = XXXXXX passdb { args = password=#hidden_use-P_to_show# userdb_namespace/shared/disabled=yes userdb_acl_user=%{auth_user} allow_nets=XXXXX/XX driver = static master = yes } dict { acl-mysql = mysql:/etc/dovecot/conf.d/dovecot-dict-sql.conf.ext }
This way, a folder is created under ~/ : shared & shared-pvt :
When user A shares a folder with B, B will find ~/shared/userA/sharedfolder
I should mention that the user authentication (backend: mysql) uses the full email address as we are in a multi-tenant context.
So the folder looks like ~/shared/usera@domain.tld/folder
Since then, everything works perfectly, we can share and see the shared folders in the webmail (SOGo).
Unfortunately, accessing these folders through an imap client (tested on Thunderbird and MSOutlook) is impossible because the subscription fails (the folder is listed, but the subscription doesn't seem to do anything). I could not find any relevant logs but I was able to confirm on the command line: I am able to view folder with LIST, subscribe with an "OK" output, but the folder is not listed with LSUB.
So I could see that the subscribtion file in maildir shows incorrect entries: V 2 Sent Trash Drafts Junk shared/testuser1@sub domain tld/INBOX/folder The dots in the folder names are replaced by tabs.
I was able to recover things by editing the file as follows: Sent Trash Drafts Junk shared/testuser1@sub.domain.tld/INBOX/folder
This means that Maildir++ and V2 subscription can't handle dots in folders.
I found a previous discussion: https://dovecot.org/pipermail/dovecot/2021-January/121233.html But the final advice can't be applied on our side:
- changing LAYOUT to FS is not possible for us
- we have already migrated the dot separator to slash
- changing the layout only for shared namespaces does not solve the problem and totally breaks the access to shared folders. Thanks a lot for your advice Best regards Julien
Hi, unfortunately this does not work with maildir++ layout. Only fix is to use LAYOUT=FS or LAYOUT=index, which you said is not possible for you.
Aki
Hello Aki;
Thanks a lot for your answer.
Changing the LAYOUT is difficult for us as it will prevent the use of our migration scripts, balancing, shared storage, backups, etc. . It will also require an extra step on a very large storage.
I could see that modifying the subscription file (removing the first line, replacing the TABs with dots) would allow for sustainable use: backwards compatibility seems to work well and the user will be able to use this file durably.
This leads to 2 questions:
- would there be any downside to forcing the use of "old style" subscription files.
- is there a way to set dovecot to create, by default, a subscription file like this.
Best regards
Julien
Le 03/03/2023 à 09:43, Aki Tuomi a écrit :
On 02/03/2023 16:21 EET Julien Nadal julien+dovecotnl@mujik.fr wrote:
Hello; We were able to set up shared folders in a cluster (using dovecot as proxy on dedicated front-end servers, without using director) by following https://doc.dovecot.org/configuration_manual/shared_mailboxes/cluster_setup/.
Here is our related conf on imap farms (dovecot v2.3.16 on Almalinux): namespaces: mail_location = maildir:~/Maildir
namespace default { inbox = yes location = prefix = separator = / } namespace shared { list = children location = imapc:~/shared/%%u:INDEXPVT=~/shared-pvt/%%u prefix = shared/%%u/ separator = / subscriptions = no type = shared }
imapc settings:
imapc_features = fetch-bodystructure fetch-headers rfc822.size search modseq acl delay-login imapc_host = XXXXXX imapc_master_user = %{user} imapc_password = XXXXXX imapc_port = XXXXXX passdb { args = password=#hidden_use-P_to_show# userdb_namespace/shared/disabled=yes userdb_acl_user=%{auth_user} allow_nets=XXXXX/XX driver = static master = yes } dict { acl-mysql = mysql:/etc/dovecot/conf.d/dovecot-dict-sql.conf.ext }
This way, a folder is created under ~/ : shared & shared-pvt :
When user A shares a folder with B, B will find ~/shared/userA/sharedfolder
I should mention that the user authentication (backend: mysql) uses the full email address as we are in a multi-tenant context.
So the folder looks like ~/shared/usera@domain.tld/folder
Since then, everything works perfectly, we can share and see the shared folders in the webmail (SOGo).
Unfortunately, accessing these folders through an imap client (tested on Thunderbird and MSOutlook) is impossible because the subscription fails (the folder is listed, but the subscription doesn't seem to do anything). I could not find any relevant logs but I was able to confirm on the command line: I am able to view folder with LIST, subscribe with an "OK" output, but the folder is not listed with LSUB.
So I could see that the subscribtion file in maildir shows incorrect entries: V 2 Sent Trash Drafts Junk shared/testuser1@sub domain tld/INBOX/folder The dots in the folder names are replaced by tabs.
I was able to recover things by editing the file as follows: Sent Trash Drafts Junk shared/testuser1@sub.domain.tld/INBOX/folder
This means that Maildir++ and V2 subscription can't handle dots in folders.
I found a previous discussion: https://dovecot.org/pipermail/dovecot/2021-January/121233.html But the final advice can't be applied on our side:
- changing LAYOUT to FS is not possible for us
- we have already migrated the dot separator to slash
- changing the layout only for shared namespaces does not solve the problem and totally breaks the access to shared folders. Thanks a lot for your advice Best regards Julien
Hi, unfortunately this does not work with maildir++ layout. Only fix is to use LAYOUT=FS or LAYOUT=index, which you said is not possible for you.
Aki
We are currently struggling with the same situation.
I played around a bit and also found that "old style" subscription seems to be the best option since a layout change is not feasible for us.
For new accounts my current plan is to add a post-login script that touches the subscription file. Dovecot will treat the empty subscription file as old-style since it doesn't have the "V 2" header.
I am still unsure what the downsides are to using "old style" subscription file and why version 2 was even introduced.
We are currently struggling with the same situation.
I played around a bit and also found that "old style" subscription seems to be the best option since a layout change is not feasible for us.
For new accounts my current plan is to add a post-login script that touches the subscription file. Dovecot will treat the empty subscription file as old-style since it doesn't have the "V 2" header.
I am still unsure what the downsides are to using "old style" subscription file and why version 2 was even introduced.
participants (3)
-
Aki Tuomi
-
Julien Nadal
-
Markus Bach