iredmail-doc/html_bk/mailbox.sharing.html

128 lines
5.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mailbox sharing (Sharing IMAP folder with other users)</title>
<link rel="stylesheet" type="text/css" href="./css/markdown.css" />
</head>
<body>
<div id="navigation">
<a href="https://www.iredmail.org" target="_blank">
<img alt="iRedMail web site"
src="./images/logo-iredmail.png"
style="vertical-align: middle; height: 30px;"
/>&nbsp;
<span>iRedMail</span>
</a>
&nbsp;&nbsp;//&nbsp;&nbsp;<a href="./index.html">Document Index</a></div><div class="admonition note">
<p class="admonition-title">This tutorial is available in other languages. <a href="https://github.com/iredmail/docs">Help translate more</a></p>
<p><a href="./mailbox.sharing-zh_CN.html">简体中文</a> /</p>
</div>
<h1 id="mailbox-sharing-sharing-imap-folder-with-other-users">Mailbox sharing (Sharing IMAP folder with other users)</h1>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul>
<li>Since iRedMail-<code>0.9.0</code>, mailbox sharing are enabled by default, you don't
need to modify any config file.</li>
<li>Since iRedMail-<code>0.7.0</code>, mailbox sharing related settings are configured
in Dovecot but not enabled, what you need to do is enabling <code>acl</code> plugin
as mentioned below.</li>
<li>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.</li>
</ul>
</div>
<h2 id="enable-mailbox-sharing">Enable mailbox sharing</h2>
<p>To enable mailbox sharing, please make sure you have plugin <code>acl</code> enabled
in Dovecot config file <code>/etc/dovecot/dovecot.conf</code> like below:</p>
<ul>
<li>For Dovecot-1.2:</li>
</ul>
<pre><code># Part of file: /etc/dovecot/dovecot.conf
protocol lda {
mail_plugins = ... acl
}
protocol imap {
mail_plugins = ... acl imap_acl
}
</code></pre>
<ul>
<li>For Dovecot-2.x:</li>
</ul>
<pre><code># Part of file: /etc/dovecot/dovecot.conf
mail_plugins = ... acl
protocol imap {
mail_plugins = ... imap_acl
}
</code></pre>
<p>Restarting Dovecot service is required.</p>
<h2 id="test-shared-folder">Test shared folder</h2>
<p>Example: share <code>from@domain.ltd</code>'s <code>Sent</code> folder to user <code>testing@domain.ltd</code>.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Do not forget the dot before each IMAP command.</p>
</div>
<pre><code># telnet localhost 143 # &lt;- Type this.
* OK [...] Dovecot ready.
. login from@domain.ltd passwd # &lt;- Type this.
# Login with full email address and password
. OK [... ACL ..] Logged in
. SETACL Sent testing@domain.ltd rli # &lt;- Type this.
# Share folder `Sent` with user testing@domain.ltd,
# with permissions: read (r), lookup (l) and insert (i).
. OK Setacl complete.
^] # &lt;- Press `Ctrl + ]` to exit telnet.
telnet&gt; quit
</code></pre>
<p>Log into Roundcube webmail or SOGo as user <code>testing@domain.ltd</code>, you should
see the shared folder.</p>
<p>Some more details:</p>
<ul>
<li>
<p>After you shared folder with <code>SETACL</code> command, dovecot will insert a record
in MySQL database.</p>
<ul>
<li>With OpenLDAP backend, it's stored in <code>iredadmin.share_folder</code>.</li>
<li>With MySQL/MariaDB/PostgreSQL backends, it's stored in <code>vmail.share_folder</code>.</li>
</ul>
</li>
</ul>
<pre><code># mysql -uroot -p
mysql&gt; USE vmail;
mysql&gt; SELECT * FROM share_folder;
+-----------------+--------------------+-------+
| from_user | to_user | dummy |
+-----------------+--------------------+-------+
| from@domain.ltd | testing@domain.ltd | 1 |
+-----------------+--------------------+-------+
</code></pre>
<h2 id="references">References</h2>
<ul>
<li>
<p>Dovecot wiki:</p>
<ul>
<li><a href="http://wiki2.dovecot.org/SharedMailboxes/Shared">Mailbox sharing between users (v2.0+)</a></li>
<li><a href="http://wiki.dovecot.org/SharedMailboxes/Shared">Mailbox sharing between users (v1.2+)</a></li>
</ul>
</li>
<li>
<p>Roundcubemail has official plugin <code>acl</code> to manage mailbox sharing.</p>
</li>
<li>SOGo groupware supports mailbox sharing by default: right-click IMAP folder, choose <code>Sharing</code>.</li>
<li><a href="https://addons.mozilla.org/en-US/thunderbird/addon/imap-acl-extension/">Imap-ACL-Extension for Thunderbird</a>, manage acls/permissions for shared mailboxes/folders on imap servers.</li>
</ul>
<h2 id="see-also">See Also</h2>
<ul>
<li><a href="./public.folder.html">How to create and manage public folder</a></li>
</ul><div class="footer">
<p style="text-align: center; color: grey;">All documents are available in <a href="https://github.com/iredmail/docs/">GitHub repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://github.com/iredmail/docs/archive/master.zip">download the latest version</a> for offline reading. If you found something wrong, please do <a href="https://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
</div></body></html>