[Dovecot] Best way to migrate from Qpopper to Dovecot

David Robillard david.robillard at gmail.com
Tue Mar 20 16:42:29 EET 2007


> Hi List,
>
> what do you think is the best way to migrate (to a new maschine) round about
> 30000 mboxes (Qpopper) with an amount of 43Gigs data, to maildir format
> (Dovecot).
> I think there are two ways:
>
> 1.
> - stop services (smtp and pop3) on the old maschine
> - copy the mboxes to the new maschine
> - run a conversion script (for excample: "Perfect_maildir"
> http://perfectmaildir.home-dn.net/)
> - start the services on the new maschine (smtp and Dovecot)
>
> 2.
> - tell the users to use the new server (from the day X) with the new feature
> (imap)
> - stop the smtp on the old maschine on day X
> - leave the old maschine active for a month or so (let users get their "old"
> mail)
>
> With the first alternative we have a high downtime, because of copying the
> mboxes and converting the stuff.
>
> What do you think?

Hello Torsten,

We switched our 3500+ users from Qpopper to Dovecot last week-end. We
had around 27Gb of data to migrate. We had a maintenance window in
which we could stop the POP services, so it was quite easy to do. Even
if we changed hardware, we kept the old name and IP so that we had no
DNS changes to do. Clean and simple.

Here's how we've done things on FreeBSD 6.2-RELEASE-p2

-- Shutdown qpopper POP services on the old machine.
-- Create a tar and transfered it to the new machine. Acutally, this
was a single step in which we used a pipe to send that tar STDOUT into
ssh's STDIN.
-- Import /etc/master.passwd and /etc/group from the old system into
the new machine.
-- Run a simple shell script to change from mbox format to Maildir
using mb2md and set permissions.
-- Exchange FQDN and IP between to old machine and the new one in
order to prevent any DNS changes.
-- Start Dovecot and your MTA on the new machine.

Concerning your desire to move your user's Maildir into
/var/mail/first_letter_of_username/username. It should be trivial to
do using a simple /bin/sh script.

Have fun !

David
-- 
David Robillard
UNIX systems administrator & Oracle DBA
CISSP, RHCE & Sun Certified Security Administrator
Montreal: +1 514 966 0122


More information about the dovecot mailing list