Migrate only E-mail accounts for a single domain from ispCP to i-MSCP

  • Hello everybody,


    I have an old ispCP installation with only one domain left on it, and that domain only has e-mail hosting.

    The problem is, there are 2376 :huh: e-mail accounts on that domain, moving them manually would be a nightmare.

    I was thinking if it's somehow possible to export manually from phpMyAdmin the table with only the e-mail accounts and forwards from this domain, and than importing them into the other i-MSCP phpMyAdmin.

    I already have the unencrypted passwords for all the accounts (i found a nice script that extracts them from the db)

    Of course it would be nice if i could also export the passwords, but if that's not possible at least some method to copy those accounts all at once and not manually adding each one would be great!

    I've read about using incremental values in SQL when importing a table but i'm not really sure that it won't conflict with e-mail ID's already present on the server where I want to move the domain, that server also has 2500+ e-mail addresses.

    As you can see below, I have mail_id ranging from 3 to 4700. Maybe i could change those values with a SQL command to replace all of them with an incremental value starting with the last value from the i-MSCP installation ? Just asking.

    Any solution, I really mean, ANY solution would be great!


    Thank you!

  • Good evening,


    As suggested by crafter best would be to create an importer script which would fetch accounts from the old database and insert them into the new database. This require to make the old database reacheable from TCP for a while and run the script from the new server. Basically put, you need mimic the i-MSCP behavior for mail account creation.


    Note that doing such a work through PhpMyAdmin is really not recommended.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • crafter don't worry, i changed both the domain name and some random characters in the password string(s)

    I've already read that post, i understood some parts of it but not totaly, and i'm a bit afraid to test it on production servers and break something.

    Good evening,


    As suggested by crafter best would be to create an importer script which would fetch accounts from the old database and insert them into the new database. This require to make the old database reacheable from TCP for a while and run the script from the new server. Basically put, you need mimic the i-MSCP behavior for mail account creation.


    Note that doing such a work through PhpMyAdmin is really not recommended.

    I'm not afraid to admit that creating such a script and actually not f***ing up both installations is a bit above my technical skills, anyone care to help me with this ? For a fair price of course, nothing good in this world is free ^^

  • crafter don't worry, i changed both the domain name and some random characters in the password string(s)

    I've already read that post, i understood some parts of it but not totaly, and i'm a bit afraid to test it on production servers and break something.

    I'm not afraid to admit that creating such a script and actually not f***ing up both installations is a bit above my technical skills, anyone care to help me with this ? For a fair price of course, nothing good in this world is free ^^

    I can do the work. See https://i-mscp.net/wcf/user/650-nuxwin/ for the price (Online support for common tasks such as debugging, patching).

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206