mbox 2 Maildir

Tamas Hegedus tamas at hegelab.org
Thu Jan 31 14:32:02 EET 2019


Dear Marc,
Thanks for pointing this small but very important detail - it simplifies 
the process so much!
Tamas

On 01/29/2019 09:22 PM, Tamas Hegedus wrote:
> W/o downtime: see the wiki page below, the "Converting" section.
> Briefly for my case something like this should work and generally seems 
> simple (no syntax checking yet, pseudo-code like):
> 
> * Configuration uses mail_location = mbox:~/mails
> * setup per-user mail location and do for each user individually in a 
> serial manner:
> -- doveadm sync maildir:~/Maildir; mbox is synced to Maildir, long 
> running time
> -- doveadm sync maildir:~/Maildir; rerun to do it for new messages (fast)
> -- add USER to userdb and set extra field to maildir:~/Maildir
> users not present in the userdb should default to dovcot default; 
> conditionally optional: doveadm auth cache flush
> -- doveadm kick (to force clients of USER to use the new Maildir)
> -- doveadm sync -R mbox:~/mails (rerun to sync the very last few mails, 
> which arrived during the editing and reloading the userdb config)
> * when done for all users, I set maildir:~/Maildir for mail location and 
> remove the userdb file definition
> 
> The problem of postfix/procmail:
> * I found this, but I do not prefer edit procmail config this way
> http://dmc1961.id.au/howto_17101101.php
> * I think that dovecot/lmpt is a better solution:
> -- dovecot takes care of the delivery and it will also know where to 
> deliver during the mixed situation
> -- on the long term: told to have better performance compared to 
> procmail; https://wiki2.dovecot.org/HowTo/PostfixDovecotLMTP
> 
> On 2019. 01. 29. 19:49, Marc Roos wrote:
>>
>> I am also migration away from mbox to in my case mdbox. I am not fully
>> aware of something that allows you to do this without downtime.
>>
>> To try to do as much as possible online, I have created an archive
>> namespace and am moving the larger >5GB mbox files with old emails to
>> that. So when the time is there to do convert active mailboxes, I have
>> less to convert. Maybe this is helpful.
>>
>>
>>
>> -----Original Message-----
>> From: Tamas Hegedus [mailto:tamas at hegelab.org]
>> Sent: 29 January 2019 17:39
>> To: dovecot at dovecot.org
>> Subject: mbox 2 Maildir
>>
>> Hi,
>>
>> I am not an professional system admin, but I am running a small debian
>> mail server for many years. It is time to migrate from mbox to Maildir.
>> There is a nice and clean description for doing this without service
>> downtime at https://wiki.dovecot.org/Tools/Doveadm/Sync
>> I have to set per-user config for mailbox type using userdb extra
>> fields.
>>
>> However, I miss some information and I can not find useful info by
>> google.
>>
>> 1. The main question: dovecot will know that for some users the mailbox
>> format is still mbox, but others already have Maildir. I do not see any
>> hint that I should setup postfix/procmail for handling the delivery
>> per-user basis. But I think I have to set this, too.
>>
>> 2. I have not learned much about userdb and it seems that dovecot was
>> written for and used by experts. I mean that the docs/wiki is not enough
>> for me: from the wiki page of userdb it will be for me difficult to
>> setup one. Can you suggest some docs for dummies?
>>
>> Thanks for your help, Tamas
>>
>> dovecot --version 2.2.27 (c0f36b0)
>> postfix  3.1.8
>> procmail v3.23pre 2001/09/13
>>
>> -- 
>> Tamas Hegedus, PhD
>> Senior Research Fellow
>> MTA-SE Molecular Biophysics Research Group Hungarian Academy of Sciences
>>   | phone: (36) 1-459 1500/60233
>> Semmelweis University          | fax:   (36) 1-266 6656
>> Tuzolto utca 37-47             | mailto:tamas at hegelab.org
>> Budapest, 1094, Hungary        | http://www.hegelab.org
>>
>> ---
>> This email has been checked for viruses by AVG.
>> https://www.avg.com
>>
>>
>>
> 


-- 
Tamas Hegedus, PhD
Senior Research Fellow
Department of Biophysics and Radiation Biology
Semmelweis University     | phone: (36) 1-459 1500/60233
Tuzolto utca 37-47        | mailto:tamas at hegelab.org
Budapest, 1094, Hungary   | http://www.hegelab.org


More information about the dovecot mailing list