Mailbox sharing (Sharing IMAP folder with other users)

Since iRedMail-0.9.0, mailbox sharing are enabled by default, you don't need to modify any config file.

Since iRedMail-0.7.0, mailbox sharing related settings are configured in Dovecot but not enabled, what you need to do is enabling acl plugin as mentioned below.

Do not mistake "shared folders" for "public folders". For shared folders, users must select which folder they want to share and with who, using an interface, like IMAP command line or the ones available with Roundcube webmail or SOGo and SOGo connectors.

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.

Attention: Do not forget the dot before 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. If you found something wrong, please do contact us to fix it.