Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Importing SquirrelMail Address Books to Horde and Roundcube

Discussion in 'E-mail Discussion' started by Nirjonadda, Oct 19, 2018.

Tags:
  1. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    641
    Likes Received:
    16
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    ---------------------
    Moderator Edit Start
    We've published the following solution since this post was first created:


    Hello Everyone,

    Good news! Hosting providers can now install the following plugins in cPanel & WHM version 78:

    Importing SquirrelMail Address Books to Roundcube - cPanel Knowledge Base - cPanel Documentation
    Importing SquirrelMail Address Books to Horde - cPanel Knowledge Base - cPanel Documentation

    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.

    Thank you.

    Moderator Edit End
    ---------------------


    SquirrelMail Deprecation and removed SquirrelMail from v76 but this still are showing in cPanel.

    ScreenShot00528.png
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 Nirjonadda, Oct 19, 2018
    Last edited by a moderator: Apr 8, 2019
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,714
    Likes Received:
    436
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Nirjonadda


    It is still present in v76, we're not shipping it in new installs. I'm waiting on information from the team that was responsible for this change on specifically why or how SquirrelMail is to be removed from existing installs but you can remove SquirrelMail from the UI by removing the SquirrelMail package if you'd like.

    Here's what I did:

    1. Found the package name:

    Code:
    rpm -qa |grep squirrel
    cpanel-squirrelmail-2012.12.09-4.cp1176.noarch
    2. Removed the package:
    Code:
    rpm -e --nodeps cpanel-squirrelmail-2012.12.09-4.cp1176.noarch
    I will update here if a case is opened for SquirrelMail remaining present in the UI
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,890
    Likes Received:
    149
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    Would be nice if there were a way to disable SquirrelMail on a per user (Linux user - cPanel account) level. This way we could begin phasing out SquirrelMail for users and only leave it enabled for users that have not yet migrated their dependence on it.
     
    cPanelLauren likes this.
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,714
    Likes Received:
    436
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    I understand what you're saying though, there really isn't a way to do that for other webmail clients either, there's the tweak setting to enable/disable the specific webmail client but no per account way.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    641
    Likes Received:
    16
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    Yes, Currently new v76 installations will not have SquirrelMail, while in v78 will be removing it from existing servers when updating to version 78
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,890
    Likes Received:
    149
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    Indeed. I really thought this was an option in the Feature Manager - but I did not see it there either.

    But even if it were in the Feature Manager... that only applies to packages, not users. Which I have never, ever, ever figured out the usefulness there. But that's a dead horse I've been bludgeoning for years.
     
  7. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,714
    Likes Received:
    436
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Yes, I was primarily trying to answer your question. What I am concerned about is that we removed the tweak setting enable/disable switch for SquirrelMail so right now the only way to remove it is to uninstall the package.

    I do agree that a per-account option for this would be useful - not just for SquirrelMail but for all the webmail clients - it'd be worth a feature request.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,890
    Likes Received:
    149
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    It would be beneficial for just about every item listed in the Feature Manager. Want one user to have shell or terminal access? Simply enable it for that user, instead of creating a single-one-time-nobody-else-uses package JUST with shell/terminal for that user to use. Seems pretty stupid to me.

    ... But I'm veering this thread off-topic and that's not my intent. And I don't do feature requests, I'm a bit soured on their principles.
     
  9. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,350
    Likes Received:
    62
    Trophy Points:
    178
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    With Squirrelmail going away, obviously one has to notify users and have them choose Horde or Roundcube as default.

    1. Once a system is updated to WHM 78 and Squirrelmail is removed, will users who still had Squirrelmail set as their default be automatically redirected back to the screen where they can choose Horde or Roundcube? Or will they get some sort of flaky error until they manually select Roundcube / Horde by clicking on their email address to bring up the the options?

    2. Are address books stored in Squirrelmail somehow exported magically and imported into Roundcube and Horde? Or does the customer have to manually export the address book from Squirrelmail and import it into Roundcube and Horde prior to the server being updated to WHM 78?

    3. If the customer has to manually export, cPanel should keep in mind that there is no facility in Squirrelmail by default to export Address Book entries. The server admin has to install something like the abook_import_export plugin.

    I haven't seen/heard anybody talk about this. But I very much consider it an issue that longtime SQuirrelmail users can have huge address books that will need exported (and they would have no clue). I don't think there has been anything in cPanel's announcements to even suggest to system administrators that this is an issue that a hosting company and its customers are going to have to deal with prior to the servers being updated to WHM 78.

    Anyone? thoughts?

    mike
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    46,987
    Likes Received:
    2,120
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello Mike,

    Webmail access attempts are automatically sent to the Webmail selection page where users can choose between Horde or Roundcube if SquirrelMail was previously enabled as the default Webmail client.

    SquirrelMail configuration and data directories in the end-user's home directory are not removed during the update to version 78, however existing data (e.g. address books) is not automatically imported into Roundcube or Horde. Users will need to manually import their SquirrelMail address books into the new webmail client of their preference.

    I recommend working with your customers to export any SquirrelMail address books you want moved into Horde/Roundcube before the upgrade to version 78. Here's an example of steps and a manual script you could use to do this:

    1. Login via SSH and make a backup of the user's .sqmaildata directory:

    Code:
    cp -a /home/username/.sqmaildata /home/username/.sqmaildata-backup
    2. Browse to a user's .sqmaildata directory:

    Code:
    cd /home/username/.sqmaildata/
    3. Create a file named /home/username/.sqmaildata/address-book-converter.sh with the following contents:

    Code:
    #!/bin/bash
    for x in `ls *.abook`
    do
    
    cat $x | while read line
    do
    echo "BEGIN:VCARD" >> $x.vcf
    echo "VERSION:3.0" >> $x.vcf
    echo -n "N:" >> $x.vcf
    echo -n `echo $line | cut -d'|' -f3` >> $x.vcf
    echo -n ";" >> $x.vcf
    echo `echo $line | cut -d'|' -f2` >> $x.vcf
    echo -n "FN:" >> $x.vcf
    echo `echo $line | cut -d'|' -f1` >> $x.vcf
    echo -n "EMAIL;TYPE=PREF,INTERNET:" >> $x.vcf
    echo `echo $line | cut -d'|' -f4` >> $x.vcf
    echo "END:VCARD" >> $x.vcf
    echo >> $x.vcf
    
    done
    
    echo "done $x"
    done
    Source: Linux in My Box: Migrating your squirrel mail contacts to roundcube

    4. Set the permissions on this script to 0755:

    Code:
    chmod 0755 /home/username/.sqmaildata/address-book-converter.sh
    5. Run the converter script:

    Code:
    sh /home/username/.sqmaildata/address-book-converter.sh
    This will convert all of the SquirrelMail address book files (.abook) to Vcard (.vcf) format. The .vcf files are importable to Roundcube using Roundcube >> Contacts >> Import.

    Additionally, I suggest opening a feature request for a utility that automatically imports SquirrelMail address books into Horde or Roundcube:

    Submit A Feature Request

    Let me know the feature request URL once it's opened.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #10 cPanelMichael, Nov 12, 2018
    Last edited: Nov 12, 2018
  11. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,350
    Likes Received:
    62
    Trophy Points:
    178
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
  12. PeteS

    PeteS Well-Known Member

    Joined:
    Jun 8, 2017
    Messages:
    160
    Likes Received:
    30
    Trophy Points:
    28
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
    In preparation for V78 and the removal of SM, I need a time line for that release.

    If there is not an official one, give me a safe bet guess, but IDK will not be satisfactory. I need to provide users a deadline for migration, particularly of contacts.

    Questions:
    - when V78 removes it, will all SM files be removed (including contacts)?
    - how will legacy webmail application default be handled? (i.e. if they have SM selected as default what will happen on login?)
     
  13. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,714
    Likes Received:
    436
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    A lot of this I can't answer just yet for you v78 isn't even into edge yet and I don't anticipate it being there until at least the end of December but most likely sometime in January.

    If it's necessary as well you can hang on to SquirrelMail this is noted in The Death of SquirrelMail | cPanel Blog

     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    PeteS likes this.
  14. PeteS

    PeteS Well-Known Member

    Joined:
    Jun 8, 2017
    Messages:
    160
    Likes Received:
    30
    Trophy Points:
    28
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
    Thank you, that is enough of a guess to get them moving on it.

    Please post back when you have answers to my two removal questions.
     
    cPanelLauren likes this.
  15. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,714
    Likes Received:
    436
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    PeteS likes this.
  16. cPanelResources

    cPanelResources Staff

    Joined:
    Apr 27, 2015
    Messages:
    94
    Likes Received:
    60
    Trophy Points:
    93
    Location:
    Houston, TX
    cPanel Access Level:
    DataCenter Provider
    cPanelResources submitted a new resource:

    How to convert SquirrelMail address books to Roundcube or Horde - Manually export SquirrelMail address books and import them into Roundcube or Horde.

    Read more about this resource...
     
  17. ramorse

    ramorse Well-Known Member

    Joined:
    Sep 6, 2003
    Messages:
    239
    Likes Received:
    4
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    This worked quite well. However, it apparently does not export extra fields like address and phone. At least one client had a lot of that data in SquirrelMail. Would it be possible to modify the script to export more fields?
     
  18. Gary Barr

    Gary Barr Registered

    Joined:
    May 5, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Evansville, IN
    cPanel Access Level:
    Root Administrator
    We've had a number of customers that didn't listen to our warnings and now that Squirrelmail is gone, they are looking for their contacts. We still have the squirrelmail directory, but when I try to use the script above to convert them into a usable format, I get this message:

    sh address-book-converter.sh
    address-book-converter.sh: line 3: syntax error near unexpected token `$'do\r''
    'ddress-book-converter.sh: line 3: `do

    Any ideas on what is wrong?
     

    Attached Files:

    • sh.jpg
      sh.jpg
      File size:
      16.5 KB
      Views:
      4
  19. PeteS

    PeteS Well-Known Member

    Joined:
    Jun 8, 2017
    Messages:
    160
    Likes Received:
    30
    Trophy Points:
    28
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
    Have you checked the file you created for errors? I know I used that script previously and it works as described. Try recreating the file?

    FWIW, this is what I finally used to create all export files in one shot. (I didn't use the send to user via email script, though.)

    -Pete
     
  20. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    46,987
    Likes Received:
    2,120
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @Gary Barr,

    It looks like the .sh file may have improper syntax. Can you check that the script is formatted correctly after you copied/pasted the code?

    Also, there's a community script (referenced on the feature request) available on the following GitHub page you may want to try instead:

    loweryaustin/cpanel-squirrelmail-exporter

    Can you let me know if this script is more useful?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #20 cPanelMichael, Feb 26, 2019
    Last edited: Feb 26, 2019
    PeteS likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice