This tutorial is available in other languages

简体中文 /

Mailbox sharing (Sharing IMAP folder with other users)

Note

Enable mailbox sharing

To enable mailbox sharing, please make sure you have plugin acl enabled in Dovecot config file /etc/dovecot/dovecot.conf like below:

# Part of file: /etc/dovecot/dovecot.conf

protocol lda {
    mail_plugins = ... acl
}

protocol imap {
    mail_plugins = ... acl imap_acl
}
# Part of file: /etc/dovecot/dovecot.conf

mail_plugins = ... acl

protocol imap {
    mail_plugins = ... imap_acl
}

Restarting Dovecot service is required.

Test shared folder

Example: share from@domain.ltd's Sent folder to user testing@domain.ltd.

Warning

Do not forget the dot before each IMAP command.

# telnet localhost 143                # <- Type this.
* OK [...] Dovecot ready.

. login from@domain.ltd passwd        # <- Type this.
                                      # Login with full email address and password
. OK [... ACL ..] Logged in

. SETACL Sent testing@domain.ltd rli  # <- Type this.
                                      # Share folder `Sent` with user testing@domain.ltd,
                                      # 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 testing@domain.ltd, you should see the shared folder.

Some more details:

# mysql -uroot -p
mysql> USE vmail;
mysql> SELECT * FROM share_folder;
+-----------------+--------------------+-------+
| from_user       | to_user            | dummy |
+-----------------+--------------------+-------+
| from@domain.ltd | testing@domain.ltd | 1     |
+-----------------+--------------------+-------+

References

See Also

All documents are available in BitBucket repository, and published under Creative Commons license. You can download the latest version for offline reading. If you found something wrong, please do contact us to fix it.