-   Linux - Server (
-   -   Postfix Mailbox user migration (

pythonn 01-22-2010 11:56 PM

Postfix Mailbox user migration
Dear Linux Guru.

I've been researching for a while now but to no avail, so your help will be much appreciated.

I'm looking into migrating postfix mailboxes and users from an old machine running Fedora5 to a new machine running cenOS. I was wondering, what would be the procedure to migrating over existing postfix mail to the new machine? Is it as simple as copying over /home directories and /etc/passwd etc?

Thank you for your help.

darvil 01-24-2010 01:27 AM

ah mail migration, one of the most irritating thing in the world.

Moving postfix files and /etc/passwd is NOT the way to do it.

The best and elegant way to do IMHO is to use imapsync ( I assume you are using imap and this is just a great way to do it.

First you create all the mail accounts on the new centOS machine. Then you sync the emails from the old to the new. It will copy all the folders (draft, deleted, etc) and it will also have all the timestamps right. I just recently did this and as far as I know it is THE easiest way for me. You will need to know the username and password to do this sync.

You should install imapsync on another box FYI. I know installing the latest version of it required for me to add some perl modules and a newer version of perl. If you run into any snags let me know. I'll give you a hand. But I rather you try it on your own first and hit me up if the snags are too much.

pythonn 01-28-2010 07:16 PM

Hey man, thanks for your help

Im really stuck right now with Imapsync...

[vs237174@domain2 IO-Socket-SSL-1.18]$ screen -r

with perl 5.8.8
Mail::IMAPClient 2.2.9
IO::Socket 1.29
IO::Socket::SSL 1.18
Digest::MD5 2.36
and the module Mail::IMAPClient version used here is 2.2.9
Command line used:
/usr/bin/imapsync \ --host1 mydomain1 --user1 sarah.tueno --passfile1 /etc/shadow \ --host2 mydomain2 --user2 sarah.tueno --passfile2 /etc/shadow
Turned ON syncinternaldates, will set the internal dates (arrival dates) on host2 same as host1.
Will try to use CRAM-MD5 authentication on host1
Will try to use CRAM-MD5 authentication on host2
From imap server [mydomain1 ] port [143] user [sarah.tueno]
To imap server [mydomain2 ] port [143] user [sarah.tueno]
Can not open imap connection on [mydomain2 ] with user [sarah.tueno]: IO::Socket::INET: connect: Connection timed out

I've googled and such and tried changing a few libraries but to nothing seems to work.

Thanks for your help!

darvil 01-29-2010 08:43 PM

You sure you have all the modules installed correctly?


I assume you installed the latest imapsync version right?

Also try with plain text although I think its not going to fix it. Give it another fresh go. Are you centos?

imapsync --host1 --authmech1 PLAIN --user1 blahblah --password1 'mypass' --host2 --authmech2 PLAIN --user2 blahblah2 --password2 'mypass'

wasamzy 03-04-2010 03:12 PM

I am also having the same problem. Please let me know how you fixed it.

bshepka 01-31-2011 07:18 PM

Great tool
Thanks for the great tool. I used it to migrate from a CentOS server that had grey hair to to brand new Ubuntu box.

All times are GMT -5. The time now is 07:31 PM.