iredmail-doc/html/change.mailbox.format.html

98 lines
5.2 KiB
HTML
Raw Normal View History

2018-07-28 06:02:19 -05:00
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2018-07-28 06:30:44 -05:00
<title>Change per-user mailbox format (e.g. maildir, mdbox)</title>
2018-07-28 06:02:19 -05:00
<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>
2018-07-28 06:30:44 -05:00
&nbsp;&nbsp;//&nbsp;&nbsp;<a href="./index.html">Document Index</a></div><h1 id="change-per-user-mailbox-format-eg-maildir-mdbox">Change per-user mailbox format (e.g. maildir, mdbox)</h1>
2018-07-28 06:02:19 -05:00
<p>iRedMail uses <code>maildir</code> mailbox format by default, it's easy to migrate and
maintain, but if mailbox size is growing, the performance will be getting
slower due to too much disk I/O. Dovecot's own mailbox format <code>mdbox</code> has very
good performance for large mailbox due to reduced disk I/O.</p>
2018-12-21 08:34:20 -06:00
<p>You may want to switch to other mailbox format for some reason. To help you
switch easily, iRedMail-0.9.9 introduces 2 new SQL columns (for SQL backends)
and LDAP attributes (for LDAP backends) to help you switch per-user mailbox
format easily. All <a href="https://wiki2.dovecot.org/MailboxFormat">mailbox formats supported by
Dovecot</a> are supported in iRedMail.</p>
2018-07-28 06:02:19 -05:00
<div class="admonition attention">
<p class="admonition-title">Attention</p>
2018-07-28 06:21:35 -05:00
<ul>
<li>If you're running an iRedMail release earlier than iRedMail-0.9.9, you can
upgrade it by following <a href="./iredmail.releases.html">iRedMail upgrade tutorials</a>.</li>
<li>iRedAdmin-Pro RESTful API interface supports changing mailbox format too.
Check its <a href="./iredadmin-pro.restful.api.html">API document</a> (expand all
2018-12-21 08:34:20 -06:00
parameters and search <code>mailboxformat</code> or <code>mailboxFormat</code>).</li>
2018-07-28 06:21:35 -05:00
</ul>
2018-07-28 06:02:19 -05:00
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<ul>
<li>Changing mailbox format does not migrate existing mailbox for you. You
have to migrate it <strong>BEFORE</strong> switching to new mailbox format, then
update SQL/LDAP data to use new mailbox format right after migrated the
mailbox.</li>
<li>New mailbox format will be used by Dovecot immediately after SQL/LDAP change.</li>
</ul>
</div>
<h2 id="sql-backends">SQL backends</h2>
<p>You can switch to different mailbox format with SQL commands below. We use
MySQL for example here.</p>
<pre><code>USE vmail;
UPDATE mailbox SET mailboxformat='mdbox', mailboxfolder='mdbox' where username=&quot;user@your-domain.com&quot;;
</code></pre>
<ul>
<li>Value of <code>mailboxfolder</code> can be any folder name supported by Linux/BSD file
system, but value of <code>mailboxformat</code> must be one of the formats supported by
Dovecot, e.g. maildir, sdbox, mdbox.</li>
<li>Value of <code>mailboxfolder</code> can not be same as previously used one, otherwise
old mailbox will be messed up when Dovecot delivers new email.</li>
</ul>
<h2 id="ldap-backends">LDAP backends</h2>
<p>You need some LDAP management tool like <a href="http://phpldapadmin.sourceforge.net/">phpLDAPadmin</a>,
<a href="https://directory.apache.org/studio/">Apache Directory Studio</a>, or command
line tool <code>ldapvi</code> (you can install it with <code>yum</code> or <code>apt-get</code> command directly)
to update mail user's LDIF data.</p>
<pre><code>mailboxFormat: mdbox
mailboxFolder: mdbox
</code></pre>
<ul>
<li>Value of <code>mailboxFolder</code> can be any folder name supported by Linux/BSD file
system, but value of <code>mailboxFormat</code> must be one of the formats supported by
Dovecot, e.g. maildir, sdbox, mdbox.</li>
<li>Value of <code>mailboxfolder</code> can not be same as previously used one, otherwise
old mailbox will be messed up when Dovecot delivers new email.</li>
<li>With iRedMail-0.9.9, if attribute <code>mailboxFormat</code> and <code>mailboxFolder</code> don't
present in user LDAP object, Dovecot is configured to use <code>maildir</code> as
default mailbox format and <code>Maildir</code> (case-sensitive) as folder name.</li>
</ul>
<h2 id="reference">Reference</h2>
<ul>
<li><a href="https://wiki.dovecot.org/Tools/Doveadm/Sync">Doveadm Sync</a>. It mentions how
to easily migrate existing mailbox to new mailbox format with <code>doveadm sync</code>
command.</li>
2018-07-28 06:02:19 -05:00
</ul><div class="footer">
<p style="text-align: center; color: grey;">All documents are available in <a href="https://bitbucket.org/zhb/iredmail-docs/src">BitBucket 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://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2">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>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-3293801-21"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-3293801-21');
</script>
</body></html>