Moving hundreds of email accounts to cpanel server ?


Well-Known Member
Jan 25, 2003
New York
We have an assortment of non-cpanel boxes inhouse that have email accounts on them and as we consolidate them we find that some of them have hundreds of email accounts each using the old format of logging in with the account name (no '' after it).

So if the physical server is '' the email account names are bob1, tony4, mike6 and the users either login with the short name or the full server address ([email protected]) not a virtual host. Its easy enough to create the domain on a cpanel box, but not the user with the existing password. We do not care about filespace, home directories, shells, etc.

What we would like to do is somehow parse the passwd file and grab enough info so we could import the usernames and passwords (nothing else about the account or existing email) and create new email accounts on the cpanel boxes (old and cpanel boxes running same OS version so passwd formats should be close). I can sed/awk/grep/etc.. anything to death and I fully understand the passwd file formats, etc. so this isnt new to me, just not sure how the cpanel/whm environment has to be fiddled with.

Has anyone done this before?. I imagine it would be easy to figure out nibbling on the password file to get what I need, but is it possible to feed it to cpanel or process it with a series of steps so cpanel creates email accounts for the domain?.

Hope this makes sense, if not I can give more detail.


Well-Known Member
Nov 9, 2001
cPanel Access Level
DataCenter Provider
Did you ever get an answer / solution to this? We have a client that wants to import about 300 email boxes (just the passwords etc. like you) and he does not want to have to type them all in.


Oct 15, 2008
I'm interested in importing the email messages. I've searched for an automated way, but no luck. Any idea?


Well-Known Member
May 23, 2004
I just created a FireFox macro using iMacros (free plugin for FireFox) which worked like a charm for creating the email accounts. I can post my plugin I suppose, but they are real easy to create (and I'm not a developer).

As for importing the data, I used some IMAP migration tools that I found here:

I've also heard good things about the IMAP Migration Tool 1.0:

Hope this helps,