Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

So I've got 60 or so users on a hand rolled postfix installation on openbsd and I'd like to move their mailboxes to our new mail server running iRedMail (postfix, vmail/mysql back end)

Does anyone know of a good way to do this? Preferably a script I can run to keep syncing the users mailboxes as MX records get updated?

I presume one way (though I don't have all their passwords!) would be to have a command line imap client that simulated the users copying their mail themselves but I'm sure there must be a shell / php script to migrate users?

Anyone got any bright ideas?

share|improve this question

3 Answers 3

I don't know anything about iRedMail, but have done many mail migrations before on heavily used mail servers. I wouldn't recommend doing this during normal production hours. You should schedule downtime of at least an hour or two depending on how long it takes to migrate the data and turn off the mail servers while this is happening so that users aren't updating their mailboxes or getting different sets of messages.

If DNS cache time is an issue, then lower the TTL on any zone you're changing to about 10 minutes, then wait at least the previous TTL's time before doing the migration. That way when you make the switch over, you can be sure that all clients will only be about 10 minutes behind the DNS change. Then change the TTL back after you're sure everything went smoothly.

share|improve this answer
    
All good advice but it doesn't answer the migration question! –  Chrispy Mar 20 '12 at 19:14
    
Ok, so there is no script already for moving the mail into iRedMail at all? –  deltaray Mar 20 '12 at 19:39

Ok, I found the tool I needed, the answers is to bypass the back end completely opt course and use imap client libraries:

http://imapsync.lamiral.info

it's "free" but not quite GPL there's been some fuss about its licence but it seems to be working.

share|improve this answer
    
yes, using imapsync is good idea, i used and it works –  c4f4t0r Nov 24 '14 at 0:13

iRedMail using OpenLDAP/MySQL to store mail accounts settings, so there will be no script that migrate your current mailboxes to OpenLDAP/MySQL. imapsync don't migrate user account settings to openldap/mysql it's just copy mailboxes

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.