Mailbox Sharing
Overview
Cloudron 6 introduced IMAP mailbox sharing. This feature works by default on new Cloudron 6 installations. Cloudrons installed before 6.0 require manual steps to enable mailbox sharing.
Background
Cloudron uses dovecot as the IMAP server. The default namespace separator in dovecot is ., but this conflicts with the mailbox sharing feature because Cloudron uses the user's email as the username, and email addresses contain . in the domain portion.
The solution is to use / as the namespace separator. New installations use this separator by default. Existing installations must migrate 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 '{}' \;