cPanel & WHM Version 94 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Utility to import Squirrelmail address book into Horde and Roundcube

mtindor shared this idea 2 years ago
Completed

As a web-hosting provider, I would like to have a feature that imports Squirrelmail’s address book into Horde or Rouncube so this happens automatically instead of manually.

======================================

As we all know, Squirrelmail is deprecated and will be removed as of WHM 78. Many companies have a lot of customers still using Squirrelmail. The Squirrelmail address books aren't automatically exported from Squirrelmail and into Horde and Roundcube. In fact, there is no direct facility in Squirrelmail to export an address book.

My suggestion is that cPanel import the Squirrelmail address book into both Horde and Roundcube as part of their Squirrelmail removal process in WHM 78. Or, at the very least provide an easy-to-use utility that allows admins and users (via the cPanel interface or the Webmail main screen) to import their old Squirrelmail address book into both Horde and Roundcube.

People using Squirrelmail have probably used it for years and likely haven't even bothered to try switching to Horde or Roundcube. As such, they are likely to have substantial address books in Squirrelmail that they will never see once Squirrelmail is removed, unless the Squirrelmail removal process automatically does it or a utility is added to a customer-accessible interface whereby they can choose to import the Squirrelmail address book into one or both of Horde and Roundcube.

Mike

Best Answer
photo

Good news! The following plugins are now available in cPanel & WHM Version 78:

https://documentation.cpanel.net/display/CKB/Importing+SquirrelMail+Address+Books+to+Roundcube

https://documentation.cpanel.net/display/CKB/Importing+SquirrelMail+Address+Books+to+Horde

These plugins will automatically import a SquirrelMail user's email contact list to their Roundcube or Horde address books. For example, the first time a Roundcube user logs in to their email account after the hosting provider installs the plugin, the system automatically migrates the user's SquirrelMail contacts to Roundcube.

Comments (4)

photo
1

I agree that with the removal of SM cPanel needs to provide a migration tool, but it can't automatically migrate the addresses since it's possible that different address books might already exist in multiple webmail clients.

I would suggest that the removal leave behind a file for each user (that has items in their address book) that can be imported into Roundcube.

One step better would be to make an export tool available available ahead of time. (There's a SM plugin, but I've never tested it.) This export tool could be offered to users prior to the removal date.

photo
2

This should have been done at the same time as when SquirrelMail deprecation was announced. Now we are left trying to figure out how to take care of customers that will lose SquirrelMail, but have no way to export their address books. By the time this feature request is done, SquirrelMail will be gone already. Talk about putting the cart before the horse.

photo
1

While it's not a substitute for an in-product feature, instructions on how to manually export the address books are available on the following forums resource if you need a workaround:

https://forums.cpanel.net/resources/how-to-convert-squirrelmail-address-books-to-roundcube-or-horde.561/

photo
3

I was looking for a project to practice perl with and decided to give this a shot. I hope this helps someone in the community to better manage the transition. If you have any problems with the script please open an issue on the GitHub page and I'll check it out.

https://github.com/loweryaustin/cpanel-squirrelmail-exporter

photo
2

Thank you, Austin! It works great!!!!!

photo
1

Awesome! I'm glad it worked well for you! I really wanted to create another script that will take all of the resulting csv files and email them to the owner's inbox along with a templated message that explains how to import the attached csv into Horde and Roundcube, but my weekend came to an end too quickly. I might be able to find time to squeeze that in sometime this week if there are some that would find it useful.

photo
2

That would be really, really cool! The only thing I would suggest is to look for empty files, first. On one server, the script generated 161 address books, but over 140 of them were empty (containing only the header column descriptions). I don't necessarily mind backing these up (so we can prove to a customer their address book was empty at that time) but I would not want to send an empty CSV file via email to the customer, with instructions on how to import it, as they would be confused that no new entries would appear in their address book in RC or Horde.

Thanks again!! Even if this is all I get, I am a happy camper. :-)

- Scott

photo
1

Thank you, Austin. Worked great for me as well!

photo
1

I'm glad it's working for you too mtindor!I wanted to provide an update to say that I've added another script that will mail all of the csv address books to the owner as an attachment. I made sure that it skips address books that are empty or that only have header information as Scott pointed out. Examples and documentation on the usage are at the same github repo.

photo
2

Hi Austin. I left this note on GitHub as well, but the email script is sending empty file attachments to the users. Any idea on that?

photo
1

Hey Scott, thanks for the heads up about the file attachments. Although the exports were working alright, the script was not attaching data to the emails because the file handle was being referenced as <$fh> instead of just $fh. I pushed a fix for the issue this morning and was able to confirm that it's resolved on my server. Please let me know if you have any questions or issues.

photo
3

Good news! The following plugins are now available in cPanel & WHM Version 78:

https://documentation.cpanel.net/display/CKB/Importing+SquirrelMail+Address+Books+to+Roundcube

https://documentation.cpanel.net/display/CKB/Importing+SquirrelMail+Address+Books+to+Horde

These plugins will automatically import a SquirrelMail user's email contact list to their Roundcube or Horde address books. For example, the first time a Roundcube user logs in to their email account after the hosting provider installs the plugin, the system automatically migrates the user's SquirrelMail contacts to Roundcube.

Replies have been locked on this page!