[Dovecot] Smooth mailbox to maildir migration
Hi all,
I have a postfix+procmail+dovecot installation, now running basicaly on pop3 hence mailbox format, with few thousand users and less than twenty gigabytes mail. I need to move all of them to maildir, to take advantage of IMAP subfolders that do not work with mbox format (so I'm told :). Of course I cannot safely stop the service for more than a bunch of seconds...
What I'm about to do:
create a second dovecot instance to cope with imap client configured for maildir (and possibly pop3 on another port for those using both), which means a dovecot launched with -c /path/to/alternate.conf and a new /etc/init.d/dovecot2-theRevenge having the proper -i option given to startproc in order to make it ignore the other instance.
for each user:
convert the mailbox with some sort of mb2mb (which is the better one?)
create a .procmailrc with a proper DEFAULT= bearing the magic trailing slash indicating maildir to procmail for each converted user.
And I'm done...
Have I forgotten something? Is there a better way? Any one else tryed such a thing?
Cheers to all,
luciano.
/"\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL / E-MAIL: posthamster@sublink.sublink.ORG / \ AND POSTINGS / WWW: http://www.mannucci.ORG/
Luciano Mannucci wrote:
Hi all,
I have a postfix+procmail+dovecot installation, now running basicaly on pop3 hence mailbox format, with few thousand users and less than twenty gigabytes mail. I need to move all of them to maildir, to take advantage of IMAP subfolders that do not work with mbox format (so I'm told :). Of course I cannot safely stop the service for more than a bunch of seconds...
What I'm about to do:
I warn you that I am very new to this ...
But have a look at the Convert plugin ....
I Think it can answer some of your questions .
harry
create a second dovecot instance to cope with imap client configured for maildir (and possibly pop3 on another port for those using both), which means a dovecot launched with -c /path/to/alternate.conf and a new /etc/init.d/dovecot2-theRevenge having the proper -i option given to startproc in order to make it ignore the other instance.
for each user:
convert the mailbox with some sort of mb2mb (which is the better one?)
create a .procmailrc with a proper DEFAULT= bearing the magic trailing slash indicating maildir to procmail for each converted user.
And I'm done...
Have I forgotten something? Is there a better way? Any one else tryed such a thing?
Cheers to all,
luciano.
on 2-10-2009 9:18 AM Harry Lachanas spake the following:
Luciano Mannucci wrote:
Hi all,
I have a postfix+procmail+dovecot installation, now running basicaly on pop3 hence mailbox format, with few thousand users and less than twenty gigabytes mail. I need to move all of them to maildir, to take advantage of IMAP subfolders that do not work with mbox format (so I'm told :). Of course I cannot safely stop the service for more than a bunch of seconds...
What I'm about to do:
I warn you that I am very new to this ...
But have a look at the Convert plugin ....
I Think it can answer some of your questions .
If your users are now on pop3, this should work well, but the convert plugin doesn't preserve message uid's so all clients will re-download all the mail that is on the server. IMAP will just re-index, but pop3 will actually re-download all the messages again.
-- MailScanner is like deodorant... You hope everybody uses it, and you notice quickly if they don't!!!!
Luciano Mannucci wrote:
Hi all,
I have a postfix+procmail+dovecot installation, now running basicaly on pop3 hence mailbox format, with few thousand users and less than twenty gigabytes mail. I need to move all of them to maildir, to take advantage of IMAP subfolders that do not work with mbox format (so I'm told :).
Also take into consideration that you will need much more disk space for this ....
Harry
Of course I cannot safely stop the service for more than a bunch of seconds...
What I'm about to do:
create a second dovecot instance to cope with imap client configured for maildir (and possibly pop3 on another port for those using both), which means a dovecot launched with -c /path/to/alternate.conf and a new /etc/init.d/dovecot2-theRevenge having the proper -i option given to startproc in order to make it ignore the other instance.
for each user:
convert the mailbox with some sort of mb2mb (which is the better one?)
create a .procmailrc with a proper DEFAULT= bearing the magic trailing slash indicating maildir to procmail for each converted user.
And I'm done...
Have I forgotten something? Is there a better way? Any one else tryed such a thing?
Cheers to all,
luciano.
on 2-10-2009 9:21 AM Harry Lachanas spake the following:
Luciano Mannucci wrote:
Hi all,
I have a postfix+procmail+dovecot installation, now running basicaly on pop3 hence mailbox format, with few thousand users and less than twenty gigabytes mail. I need to move all of them to maildir, to take advantage of IMAP subfolders that do not work with mbox format (so I'm told :).
Also take into consideration that you will need much more disk space for this ....
You will need 2 times the mailstore during the conversion, but after you can remove the mbox files to recover some of the space if you need to.
-- MailScanner is like deodorant... You hope everybody uses it, and you notice quickly if they don't!!!!
on 2-10-2009 7:49 AM Luciano Mannucci spake the following:
Hi all,
I have a postfix+procmail+dovecot installation, now running basicaly on pop3 hence mailbox format, with few thousand users and less than twenty gigabytes mail. I need to move all of them to maildir, to take advantage of IMAP subfolders that do not work with mbox format (so I'm told :). Of course I cannot safely stop the service for more than a bunch of seconds...
You can have subfolders with mbox, but you can not have folders that contain both messages and sub-folders. They either have messages or sub-folders.
What I'm about to do:
create a second dovecot instance to cope with imap client configured for maildir (and possibly pop3 on another port for those using both), which means a dovecot launched with -c /path/to/alternate.conf and a new /etc/init.d/dovecot2-theRevenge having the proper -i option given to startproc in order to make it ignore the other instance.
I think you can do this with namespaces, without running two dovecot daemons.
for each user:
convert the mailbox with some sort of mb2mb (which is the better one?) I am also working on this, but I don't have as many users.
create a .procmailrc with a proper DEFAULT= bearing the magic trailing slash indicating maildir to procmail for each converted user.
You will have to do this unless you can convert all users at once.
And I'm done...
Have I forgotten something? Is there a better way? Any one else tried such a thing?
Cheers to all,
luciano.
-- MailScanner is like deodorant... You hope everybody uses it, and you notice quickly if they don't!!!!
On 10.02.2009 16:49 Uhr, Luciano Mannucci wrote:
Hi all,
Hi,
I have a postfix+procmail+dovecot installation, now running basicaly on pop3 hence mailbox format, with few thousand users and less than twenty gigabytes mail. I need to move all of them to maildir, to take advantage of IMAP subfolders that do not work with mbox format (so I'm told :). Of course I cannot safely stop the service for more than a bunch of seconds...
What I'm about to do:
create a second dovecot instance to cope with imap client configured for maildir (and possibly pop3 on another port for those using both), which means a dovecot launched with -c /path/to/alternate.conf and a new /etc/init.d/dovecot2-theRevenge having the proper -i option given to startproc in order to make it ignore the other instance.
for each user:
convert the mailbox with some sort of mb2mb (which is the better one?)
create a .procmailrc with a proper DEFAULT= bearing the magic trailing slash indicating maildir to procmail for each converted user.
And I'm done...
Have I forgotten something? Is there a better way?
I do all migrations with perdition (imap proxy) It is very simpe to configure and rock solid. So you can make perdition listen on 110, dovecotA listens on 111 and dovecotB listens on 112. A text file tells who is on which server. With this setup you can even migrate into the same directory from mbox to maildir.
Any one else tryed such a thing?
Cheers to all,
luciano.
cheers, dirk
participants (4)
-
Dirk Essl
-
Harry Lachanas
-
Luciano Mannucci
-
Scott Silva