Mail contacts lost during migration from ispCP 1.0.7

  • Hi there!,


    I've just made the migration from ispcp 1.0.7 and, after ironing out some problems with the status of some domains and some other minor fixes, I've found that the mail contacts sotred by the users are no longer present in the new roundcube webmail service.


    Is there any way to get them back?


    Thanks!


    -Iván.

  • Maybe you can migrate them from your existing? backup..

  • i-MSCP used SquirrelMail, you probably need to import it from the old installation. if you used roundcube also before, then the database name was not the same, so just copy over the entries.

  • Well, I've found at: /var/cache/imscp/addons/vendor/imscp/roundcube/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php a script that looks like a script to import user info from squirrelmail into roundcube.


    This script was included in the i-MSCP installation, I'm looking into it right now to see if it does what it says it does (found a "// Copy addres book" comment inside the code so far, but I'm not sure if my SquirrelMail data is available after the upgrade. probably I'll have to restore a backup to try it...


    -Iván.

  • not a biggie, also I've found here (see the comment at the end of the post) a very promising php script that reads squirrelmail's files and imports them directly into roundcube's mysql databse. Will posts my results, thanks! :thumbsup:

  • Okay, success!


    I recovered a backup (actually just reconnected a virtual drive containing my old ispcp before the migration) and found the .abook files (they were at /var/www/ispcp/gui/tools/webmail/data ).
    Then, using the script mentioned in my previous post, got all the abooks inserted in the roundcube's database. Love this! 8)


    -Iván.

  • Hello ;


    Could you please create a mini howto with needed resource links? Then, we can add it in our wiki at migration section.


    Thanks

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

  • Sure, here's the mini how-to:


    Here's what you need:


    .abook files from your users. They are located on /var/www/ispcp/gui/tools/webmail/data on ispcp omega, but they're lost after upgrading to i-mscp, so you'll want to have a backup for this :whistling: .


    This script: (modified from a comment by user k4b3za at http://blog.kxr.me/2010/04/mig…uirrel-mail-contacts.html)



    Basically, this script looks for "username.abook" files where "username(s)" are your imported roundcube database users. If it finds any match, it will then open the .abook and will insert nick,name,surname and email fields into roundcube's contact database for that username, unless the email adress for the contact is already there (maybe the user already started to type his/her contacts).


    It doesn't handle contact groups or members of groups (don't know if they even existed in squirrelmail).


    ...so you just run the script and you should be all set. Backup your database first (just in case) and Enjoy!


    -Ivan.