Enable Mailbox Sharing
Below config may help to achieve this:
To enable mailbox sharing, you must check you have plugin acl enabled in Dovecot config file /etc/dovecot/dovecot.conf as mentioned below:
For Dovecot-1.2:
# Part of file: /etc/dovecot/dovecot.conf
protocol lda {
mail_plugins = ... acl
}
protocol imap {
mail_plugins = ... acl imap_acl
}
For Dovecot-2.x:
# Part of file: /etc/dovecot/dovecot.conf
mail_plugins = ... acl
protocol imap {
mail_plugins = ... imap_acl
}
Restarting the Dovecot service is a must.
Test shared folder
Example: share
[email protected]'s Sent folder to user
[email protected]
Note: Dots must be inserted before each IMAP command.
# telnet localhost 143 # <- Type this.
* OK [...] Dovecot ready.
. login
[email protected] passwd # <- Type this.
# Login with full email address and password
. OK [... ACL ..] Logged in
. SETACL Sent
[email protected] rli # <- Type this.
# Share folder `Sent` with user
[email protected],
# with permissions: read (r), lookup (l) and insert (i).
. OK Setacl complete.
^] # <- Press `Ctrl + ]` to exit telnet.
telnet> quit
Log into Roundcube webmail or SOGo as user
[email protected], you should see the shared folder.
Some more details:
Once you shared the folder with the SETACL command, dovecot will insert a record in MySQL database.
With OpenLDAP backend, it's stored in iredadmin.share_folder.
With MySQL/MariaDB/PostgreSQL backends, it's stored in vmail.share_folder.
# mysql -uroot -p
mysql> USE vmail;
mysql> SELECT * FROM share_folder;
+-----------------+--------------------+-------+
| from_user | to_user | dummy |
+-----------------+--------------------+-------+
|
[email protected] |
[email protected] | 1 |
+-----------------+--------------------+-------+