IRedMail/FAQ/Share.IMAP.Folder
From iRedMail
(Difference between revisions)
(→Configure Dovecot) |
(→Test shared folder) |
||
| (18 intermediate revisions not shown) | |||
| Line 3: | Line 3: | ||
Note: | 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 {}"'''. | * 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. | + | * Not all companies will allow user to share mailboxes, it may leak confidential information, so this feature is disabled in iRedMail by default. |
| + | * 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 the ones available with SOGo and SOGo connectors, or IMAP command line. | ||
= Summary = | = Summary = | ||
| Line 20: | Line 21: | ||
= Requirements = | = Requirements = | ||
| - | * | + | * iRedMail-0.7.0 or later versions. |
| - | * Roundcube | + | |
| + | Some explainations: | ||
| + | * iRedMail-0.7.0 ships dovecot-1.2, with all share folder related settings configured. But share folder is disabled by default. | ||
| + | * Roundcube webmail in iRedMail-0.7.0 works with share folder by default. There's no addition change required. | ||
= Configure Dovecot = | = 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 {}"''': | ||
{{cfg|dovecot.conf|<pre> | {{cfg|dovecot.conf|<pre> | ||
protocol lda { | protocol lda { | ||
| Line 35: | Line 41: | ||
</pre>}} | </pre>}} | ||
| - | + | = Test shared folder = | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | Please restart dovecot after you modified its config file. | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | To test shared folder, I will share my (from@domain.ltd) 'Sent' folder to my colleague 'testing@domain.ltd'. | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | To | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
Steps: | Steps: | ||
* Set a share folder with telnet. | * Set a share folder with telnet. | ||
| - | + | ** WARNING: Do not forget the dot before IMAP command. | |
{{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 | + | . login from@domain.ltd passwd # <- Type this. Login with my email address and plain password. |
. OK [... ACL ..] Logged in | . OK [... ACL ..] Logged in | ||
| - | . SETACL Sent testing@ | + | . SETACL Sent testing@domain.ltd rli # <- Type this. Share folder 'Sent' to user testing@domain.ltd, with permissions: read (r), lookup (l) and insert (i). |
. OK Setacl complete. | . OK Setacl complete. | ||
| - | ^] # <- Ctrl + ] | + | ^] # <- Press 'Ctrl + ]' to exit telnet. |
telnet> quit | telnet> quit | ||
</pre>}} | </pre>}} | ||
| - | * Log into roundcube webmail with account testing@ | + | * Log into roundcube webmail with account testing@domain.ltd. And you can see the shared folder. See [http://screenshots.iredmail.googlecode.com/hg/iredmail/roundcube/imap-share-folder.png screenshot here] |
| - | * After you shared folder with 'SETACL' command, dovecot will insert a record in MySQL database | + | |
| + | Some more details: | ||
| + | * After you shared folder with 'SETACL' command, dovecot will insert a record in MySQL database. | ||
| + | ** With OpenLDAP backend, it's stored in '''iredadmin.share_folder'''. | ||
| + | ** With MySQL backend, it's stored in '''vmail.share_folder'''. | ||
{{cmd|<pre> | {{cmd|<pre> | ||
# mysql -uroot -p | # mysql -uroot -p | ||
mysql> USE vmail; | mysql> USE vmail; | ||
mysql> SELECT * FROM share_folder; | mysql> SELECT * FROM share_folder; | ||
| - | +--------------+--------------+-------+ | + | +-----------------+--------------------+-------+ |
| - | | from_user | + | | from_user | to_user | dummy | |
| - | +--------------+--------------+-------+ | + | +-----------------+--------------------+-------+ |
| - | | | + | | from@domain.ltd | testing@domain.ltd | 1 | |
| - | +--------------+--------------+-------+ | + | +-----------------+--------------------+-------+ |
</pre>}} | </pre>}} | ||
= References = | = References = | ||
* [http://www.iredmail.org/forum/topic1446-howto-creating-shared-folders.html BigMichi1's contribution] | * [http://www.iredmail.org/forum/topic1446-howto-creating-shared-folders.html BigMichi1's contribution] | ||
| + | * [[Addition/Shared_folders_with_dovecot_1.2 |maxie_ro's contribution]] | ||
* Dovecot wiki: [http://wiki.dovecot.org/SharedMailboxes/Shared Mailbox sharing between users (v1.2+)] | * Dovecot wiki: [http://wiki.dovecot.org/SharedMailboxes/Shared Mailbox sharing between users (v1.2+)] | ||
* Plugin for Roundcube webmail (0.5+): http://lists.roundcube.net/mail-archive/dev/2011-01/0000012.html | * Plugin for Roundcube webmail (0.5+): http://lists.roundcube.net/mail-archive/dev/2011-01/0000012.html | ||
| + | ** NOTE: This plugin is shipped in Roundcubemail, since Roundcubemail-0.7.x, plugin name "acl". | ||
* [https://addons.mozilla.org/en-US/thunderbird/addon/imap-acl-extension/ Imap-ACL-Extension for Thunderbird], manage acls/permissions for shared mailboxes/folders on imap servers. | * [https://addons.mozilla.org/en-US/thunderbird/addon/imap-acl-extension/ Imap-ACL-Extension for Thunderbird], manage acls/permissions for shared mailboxes/folders on imap servers. | ||
| + | |||
| + | [[Category: iRedMail/FAQ]] | ||
| + | [[Category: FAQ]] | ||
Current revision as of 08:30, 3 October 2012
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 in iRedMail by default.
- 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 the ones available with SOGo and SOGo connectors, or IMAP command line.
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.
Some explainations:
- iRedMail-0.7.0 ships dovecot-1.2, with all share folder related settings configured. But share folder is disabled by default.
- Roundcube webmail in iRedMail-0.7.0 works with share folder by default. There's no addition change required.
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
}
|
Test shared folder
Please restart dovecot after you modified its config file.
To test shared folder, I will share my (from@domain.ltd) 'Sent' folder to my colleague 'testing@domain.ltd'.
Steps:
- Set a share folder with telnet.
- WARNING: Do not forget the dot before IMAP command.
| Terminal: |
# telnet localhost 143 # <- Type this. * OK [...] Dovecot ready. . login from@domain.ltd passwd # <- Type this. Login with my email address and plain password. . OK [... ACL ..] Logged in . SETACL Sent testing@domain.ltd rli # <- Type this. Share folder 'Sent' to 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 with account testing@domain.ltd. And you can see the shared folder. See screenshot here
Some more details:
- After you shared folder with 'SETACL' command, dovecot will insert a record in MySQL database.
- With OpenLDAP backend, it's stored in iredadmin.share_folder.
- With MySQL backend, it's stored in vmail.share_folder.
| Terminal: |
# mysql -uroot -p mysql> USE vmail; mysql> SELECT * FROM share_folder; +-----------------+--------------------+-------+ | from_user | to_user | dummy | +-----------------+--------------------+-------+ | from@domain.ltd | testing@domain.ltd | 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
- NOTE: This plugin is shipped in Roundcubemail, since Roundcubemail-0.7.x, plugin name "acl".
- Imap-ACL-Extension for Thunderbird, manage acls/permissions for shared mailboxes/folders on imap servers.
