On 11/04/2013 02:29 AM, Noel Butler wrote:
On 04/11/2013 14:33, Regan Yelcich wrote:
On 2/11/2013, at 11:40 pm, Noel Butler <noel.but...@ausics.net> wrote:

On 02/11/2013 20:25, Regan Yelcich wrote:
Can someone advise the best way to convert mailboxes from Mbox to
Maildir for Dovecot 2.17 on Ubuntu? Thanks.


mb2md.pl

http://batleth.sapienti-sat.org/projects/mb2md/


The program has at least 2 bugs in it:

. If the body has paragraph break (i.e., '\n') followed by the RFC822
  keyword 'From', the original message will loose the last half of
  the message and a phantom message will be created.

  Change from my notes:

        #           if ( /^From /
        #     -to-
        #           if ( /^From .*? \d\d:\d\d:\d\d \d\d\d\d/

. I never could figure out where the second bug was. This one created
  some messages with blank subject lines.

Another annoyance was prefixing the newly created mail folders with a '.'

Our site is small (300 users) with 15-20 years of e-mail history.
A conservative estimate of the conversion was something like 30 million
messages.

Did it work? Yes. I wish I had more time for testing, though. In the end,
we fixed the problems on the back side.



I don't need to do anything specific for Dovecot? It'll see the new
Maildir account and automatically create the indexes etc?

IIRC it shows you how to use it, you need to indicate where the new maildir is, 
if you have only a few, do them all manually, if you
have many, write a quick bash or perl script to do them, and dovecot will 
create the indexes when they login.

You will need to tell dovecot to look for the new location though, if your 
using system users as I suspect you are, then
maildir:~/Maildir should do it *but* dont forget to make sure your MTA knows to 
use maildir as well, I've not worked with system
users for a decade, but I think in postfix   home_mailbox = Maildir/ will do 
it, with sendmail its much more tricky and your best
sticking with mbox, if exim, NFI - dont use it :)



--

        Mark
        --0-
----------------------------------------------------------------------
Mark Moore
UCAR/NCAR/CGD                                   mmo...@ucar.edu
1850 Table Mesa Drive                           (W) 303 497-1338
Boulder, CO 80305                               (F) 303 497-1324

Reply via email to