IRedMail/FAQ/Share.IMAP.Folder
From iRedMail
(→Configure Roundcube Webmail) |
(→Test shared folder) |
||
| Line 59: | Line 59: | ||
{{cmd|<pre> | {{cmd|<pre> | ||
| - | # telnet localhost 143 | + | # telnet localhost 143 # <- Type this. |
* OK [...] Dovecot ready. | * OK [...] Dovecot ready. | ||
| - | . login from@domain.ltd passwd # <- Login with your email address and password. | + | . login from@domain.ltd passwd # <- Type this. Login with your email address and password. |
. OK [... ACL ..] Logged in | . OK [... ACL ..] Logged in | ||
| - | . SETACL Sent testing@a.cn rl # <- Share folder 'Sent' to user testing@a.cn, allow to read (r) and lookup (l). | + | . SETACL Sent testing@a.cn rl # <- Type this. Share folder 'Sent' to user testing@a.cn, allow to read (r) and lookup (l). |
. OK Setacl complete. | . OK Setacl complete. | ||
^] # <- Ctrl + ] | ^] # <- Ctrl + ] | ||
Revision as of 06:11, 29 March 2011
Contents |
Note:
- Mailbox sharing related settings are configured by default in iRedMail-0.7.0, you just need to enable acl plugins in dovecot.conf, section "protocols lda {}" and "protocol imap {}".
- Not all companies will allow user to share mailboxes, it may leak confidential information, so this feature is disabled by default.
Summary
With Dovecot-1.2, it's possible to share your IMAP folders to other users. This article describes:
- How to enable mailbox sharing in Dovecot
- How to enable mailbox sharing in Roundcube webmail.
- How to test mailbox sharing with telnet
Note:
- For Roundcube user, there's a plugin available for roundcube-0.5, it's easy to let user manage their mailbox sharing.
- For Thunderbird user, there's a add-on available too.
You can find links in Reference section.
Requirements
- iRedMail-0.7.0 or later versions.
iRedMail-0.7.0 ships dovecot-1.2, and has all share folder related settings configured. But share folder is disabled by default.
Configure Dovecot
With iRedMail-0.7.0 or later versions, what we need to do is just enable ACL plugins to provide folder sharing.
- Edit /etc/dovecot.conf (RHEL/CentOS) or /etc/dovecot/dovecot.conf (Debian/Ubuntu/openSUSE) or /usr/local/etc/dovecot.conf (FreeBSD), add ACL plugins in section "protocol lda {}" and "protocol imap {}":
| File: dovecot.conf |
protocol lda {
mail_plugins = ... acl
}
protocol imap {
mail_plugins = ... acl imap_acl
}
|
Configure Roundcube Webmail
Roundcube-0.5 and later versions support shared IMAP folder, with one config setting in its main config file main.inc.php. It should be /var/www/roundcubemail/config/main.inc.php (RHEL/CentOS) or /usr/share/apache2/roundcubemail/config/main.inc.php (Debian/Ubuntu) or /srv/www/roundcubemail/config/main.inc.php (openSUSE) or /usr/local/www/roundcubemail/config/main.inc.php (FreeBSD).
| File: main.inc.php |
// imap's folder delimiter $rcmail_config['imap_delimiter'] = "/"; // Leave below settings as "null". $rcmail_config['imap_ns_personal'] = null; $rcmail_config['imap_ns_other'] = null; $rcmail_config['imap_ns_shared'] = null; |
Test shared folder
Please restart dovecot and apache web server after you modified dovecot and roundcube.
Steps:
- Set a share folder with telnet.
| Terminal: |
# telnet localhost 143 # <- Type this. * OK [...] Dovecot ready. . login from@domain.ltd passwd # <- Type this. Login with your email address and password. . OK [... ACL ..] Logged in . SETACL Sent testing@a.cn rl # <- Type this. Share folder 'Sent' to user testing@a.cn, allow to read (r) and lookup (l). . OK Setacl complete. ^] # <- Ctrl + ] telnet> quit |
- Log into roundcube webmail with account testing@a.cn. And you can now see the shared folder. See screenshot here
- After you shared folder with 'SETACL' command, dovecot will insert a record in MySQL database (table share_folder):
| Terminal: |
# mysql -uroot -p mysql> USE vmail; mysql> SELECT * FROM share_folder; +--------------+--------------+-------+ | from_user | to_user | dummy | +--------------+--------------+-------+ | www@a.cn | testing@a.cn | 1 | +--------------+--------------+-------+ |
References
- BigMichi1's contribution
- maxie_ro's contribution
- Dovecot wiki: Mailbox sharing between users (v1.2+)
- Plugin for Roundcube webmail (0.5+): http://lists.roundcube.net/mail-archive/dev/2011-01/0000012.html
- Imap-ACL-Extension for Thunderbird, manage acls/permissions for shared mailboxes/folders on imap servers.
