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!

Questions about Squirrelmail deprecation

Discussion in 'E-mail Discussion' started by mtindor, Nov 8, 2018.

Tags:
  1. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,348
    Likes Received:
    61
    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...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    46,355
    Likes Received:
    2,041
    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...
    #2 cPanelMichael, Nov 12, 2018
    Last edited: Nov 12, 2018
  3. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,348
    Likes Received:
    61
    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.
  4. 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
  5. PeteS

    PeteS Well-Known Member

    Joined:
    Jun 8, 2017
    Messages:
    152
    Likes Received:
    28
    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
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    46,355
    Likes Received:
    2,041
    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...
    #6 cPanelMichael, Feb 26, 2019
    Last edited: Feb 26, 2019
    PeteS likes this.
  7. PeteS

    PeteS Well-Known Member

    Joined:
    Jun 8, 2017
    Messages:
    152
    Likes Received:
    28
    Trophy Points:
    28
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
    That's what I referenced above, but the link didn't post, I guess. Anyway, it works great!

    -Pete
     
    cPanelMichael 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