Donny Brooks
2010-Sep-11 07:14 UTC
[Dovecot] Migrating mail from mbox to maildir using dovecot
Hello, Currently our mail server is setup to use postfix and dovecot, which is fine except it is setup to use mbox format mail. That and procmail as we need to move to sieve but that is a different issue. I have searched until blue in the face and cannot find a 100% working solution that doesn't require alot of manual interaction to move the mail boxes from mbox to maildir. I have tried the mb2md.pl stuff but with over 150+ users that can get tedious having to log in as each one of them to migrate them. I also tried the convert plugin located here: http://wiki.dovecot.org/Plugins/Convert but it kept erroring about not able to convert the box and exiting. We have approx 200GB of mail total that needs to be migrated. Maybe I am just simply missing something but is there a way that we can migrate all the users with minimal end user interaction and minimal administration time? We need this done asap as our backups are killing us with the large mbox style files. Thanks in advance for any and all input to this. -- Donny B.
Charles Marcus
2010-Sep-11 15:28 UTC
[Dovecot] Migrating mail from mbox to maildir using dovecot
On 2010-09-11 3:14 AM, Donny Brooks <dbrooks at mdah.state.ms.us> wrote:> Currently our mail server is setup to use postfix and dovecot,Version of DC?> I have searched until blue in the face and cannot find a 100% > working solution that doesn't require alot of manual interaction to > move the mail boxes from mbox to maildir.Dovecot 2.0 would use dsync, and it should be really easy and avoids most problems the other methods can have (haven't used it yet myself, but will on a system I'll be upgrading soon)... http://wiki2.dovecot.org/Migration/MailFormat But either way, to avoid doing each one manually you'll need to use some scripting magic. If I were doing it, I'd probably write a script (or more likely hire someone to do it for me, since my scripting skills are rudimentary at best) that would run at the least busy time of day for your system, and iterate through the user: disable login kill any existing processes for that user run dsync to convert everything re-enable login rinse, repeat.> I also tried the convert plugin located here: > http://wiki.dovecot.org/Plugins/Convert but it kept erroring about > not able to convert the box and exiting.Did you ask here about the errors? Timo could probably address any problems your having very quickly. -- Best regards, Charles
Stan Hoeppner
2010-Sep-12 02:51 UTC
[Dovecot] Migrating mail from mbox to maildir using dovecot
Donny Brooks put forth on 9/11/2010 2:14 AM:> We need this done asap as our backups are killing us with the large mbox style files.Does your backup software not offer data deduplication? I was under the impression that all commercial backup software offered this feature in modern times. In a nutshell, if a file changes from one backup to the next, only the part of that file which has changed is then backed up, not the entire file. The "master" copy and the "fragments" are then merged during a restore. If you don't have this feature, may I ask what backup solution you're using? I'm not pointing you away from maildir. It is still preferable for some reasons in some environments. I'm simply saying, AFAIK, maildir simply doesn't have much advantage over mbox WRT modern (commercial) backup software. -- Stan