Hi! I saw in
a recent announcement that the Mail app now supports shared mailboxes! The relevant quote and screenshot:
We also introduce shared mailboxes so your enterprise or organization can be more efficient and better organize its teams and workflow.
However, I couldn’t find any way to activate these mailboxes. Is it something that can be done from within the app or do I have to do it from outside?
I’m currently selfhosting NextCloud 25.0.5, which seems to have been released at the time of the announcement. (I realised as I was typing this that v26 is out now, so I’ll upgrade to that in a bit).
Thanks in advance!
You would have to set up shared mailboxes on your mail server. The mail app is only a client.
Ah okay, thanks for the clarification
I’m assuming that would be one of the first two options (“public mailboxes” and “mailbox sharing between users”) here in the case of Dovecot:
I’m new to Dovecot and email administration in general, but the above documentation talks about using IMAP ACLs. I just scrolled through some of the GitHub issues like this one I see the Mail app using the same mechanism too:
03:51PM - 18 Aug 22 UTC
12:29PM - 24 Feb 23 UTC
4. to release
feature: mailbox sharing
## Is your feature request related to a problem? Please describe.
I have an e
… mail account that receives emails that are relevant to a group of people, so I want everyone to be able to see that email account without giving out access data. I might want to limit read / write / delete / ... access to this mailbox.
* 1.0 Possibly send replies from sharer email. If that is not possible, at least set a "reply-to" as a sharee, so that the reply to the outgoing message returns into the shared mailbox.
* 2.0 Save sent email centrally as well, so those are accessible to everyone part of the share.
* 3.0 Only offer this if the IMAP server has support for it
## Describe the solution you'd like
The goal is to offer sharing / unsharing of mailboxes via ACL. The feature is standardized in [RFC4314](https://www.rfc-editor.org/rfc/rfc4314) and [RFC2086](https://www.rfc-editor.org/rfc/rfc2086).
This is an optional IMAP feature. The Mailserver must support the capability `ACL`. In dovecot, for example, this is a plugin.
## Implementation idea
Command to be sent to IMAP - see example here: https://docs.iredmail.org/mailbox.sharing.html
#### Reading ACLs
#### Changing ACLs
Mailboxes are shared to other *users of the IMAP server*. So there is no guaranteed relation between other users of the Nextcloud instance and other users on the IMAP server. E.g. I configure my Mail account with provider1, another user uses provider2. Only with provisioned accounts we can somewhat assume that other users with the same email domain are valid sharees.
From a UI perspective, we should not display a sharing option if the IMAP server doesn't support it. (Capabilities Check will tell us if ACLs are supported)
There is also an option for Public Sharing where I share a mailbox with the whole instance.
These mailboxes have the $identifier set to "anyone" and will allow all IMAP users on this server to access this mailbox.
Identifiers could also be, depending on your IMAP server, things like group names. They could be unix or ldap groups. This is guesswork, though, and depends on the IMAP configuration. The important part is to detect this mailbox and display it.
There is also a possibility of using negative rights, although not every server support it, where you specify the right beginning with a minus. (<- needs more investigation what exactly the difference to deleting someone's right is)
⚠️ Also something to look out for is the "Seen" flag, this could theoretically overwrite either the IMAP flag or when syncing back, the DB flag.
## Reference implementations
### SOGO Mail
They offer an autocompleted list of email addresses that you can share your mailbox with.
| ![image](https://user-images.githubusercontent.com/7427347/185439108-49a7747b-227c-4aaa-914b-f02f432e42bd.png)| ![image](https://user-images.githubusercontent.com/7427347/185438890-8f80c3f9-2d6e-4f5c-b99f-880cee1972b3.png)| ![image](https://user-images.githubusercontent.com/7427347/185439013-ec65938d-6ed8-444e-9ff1-11390a95ac12.png) |
Requires a plugin: https://addons.thunderbird.net/en-us/thunderbird/addon/imap-acl-extension
| ![image](https://addons.thunderbird.net/user-media/previews/full/46/46371.png?modified=1530208757) | ![image](https://addons.thunderbird.net/user-media/previews/full/46/46372.png?modified=1530208758) |
## Describe alternatives you've considered
## Work Packages
- [x] https://github.com/nextcloud/mail/issues/7732
- [x] https://github.com/nextcloud/mail/issues/7735
- [x] https://github.com/nextcloud/mail/issues/7763
- [x] https://github.com/nextcloud/mail/issues/7910
- [x] https://github.com/nextcloud/mail/issues/7888
- [x] https://github.com/nextcloud/mail/issues/7889
- [x] https://github.com/nextcloud/mail/issues/7907
- [x] https://github.com/nextcloud/mail/issues/7909
- [x] https://github.com/nextcloud/mail/issues/7908
- [x] https://github.com/nextcloud/mail/issues/7912
- [x] https://github.com/nextcloud/mail/issues/7911
- [x] https://github.com/nextcloud/mail/issues/7916
- [x] https://github.com/nextcloud/mail/issues/8071
## Additional context