Mailbox sharing
Overview
Cloudron 6 introduced IMAP mailbox sharing. This feature works by default on new version 6 installations. Enable mailbox sharing on installations before 6.0 by following manual steps.
Background
Dovecot is used as the IMAP server. The default namespace separator in dovecot is .. This conflicts with the mailbox sharing feature because the user's email is used as the username, and email addresses contain . in the domain portion.
Use / as the namespace separator to solve this. New installations use this separator by default. Migrate existing installations manually.
This migration is not automated because some email clients may cache the separator. Affected clients require re-adding the email account. Roundcube, SnappyMail, SOGo, and Thunderbird work after logging out and back in. On Android K-9, select Refresh Folder List on the account.
Pre-flight
Check which separator the mail server uses by inspecting /home/yellowtent/boxdata/mail/dovecot/config.ini. If namespace_separator is /, skip this guide. If it is ., continue below.
Migrate
SSH into the server and run the following commands to migrate to the / separator:
cd /home/yellowtent/boxdata/mail/vmail
find . -type f -name '*.sieve' -exec sed -e '/fileinto/{s,\.,/,g}' -i.bak '{}' \;
sed -i -e 's/namespace_separator=.*/namespace_separator=\//' /home/yellowtent/boxdata/mail/dovecot/config.ini
docker restart mail
The script creates a backup of all sieve scripts. Delete them after users confirm no issues:
find . -type f -name '*.sieve.bak' -exec rm '{}' \;