Help - Search - Members - Calendar
Full Version: HOWTO: Upgrade Cpanel's Version Of SquirrelMail to version 1.4.3-RC1
The Planet Forums > Control Panels > cPanel/WHM > Cpanel/WHM HOWTOs
aussie
I have created a distribution of Squirrelmail and upgraded it to the latest stable version of Squirrelmail currently, SquirrelMail version 1.4.3-RC1.

If you are using Cpanel's version of Squirrelmail, you will notice they are STILL using an old, outdated and vulnarable version of Squirrelmail. :rolleyes: Their version is 1.4.0.

This is version 1.4.3-RC1.
This release contains a number of bug fixes, minor user interface tweaks, and some XSS fixes.

By following this howto, you can update your version of Cpanel's Squirrelmail to the latest version. I have removed the restrictions imposted by Cpanel and that is the inability of being able to add Plugins.

With this version, you may install as many plugins as you wish. Once you install my modified version visit http://www.squirrelmail.org/ and install all the plugins you want!.

In addition my modified version adds the following;

* Ability to add as many plugins as you want. Make sure those plugins are compatible with 1.4.3.
* Includes plugin ASKUSERINFO and modified by me that forces users to enter their Username and Reply-TO-Email address if they haven't.
* Completely replaces Cpanels version of Squirrelmail and allows your users to run the latest (STABLE RELEASE).
* Works with or without open_basedir protection.
* Works exactly that same as the older version but gives you the latest version.
* Does not disturb your users existing data files.

The installation takes 10min.

SSH2 to your server. You are using SSH2 aren't you?

Copy and paste the following commands to your command line then press enter.

cd /usr/local/cpanel/base/3rdparty
mv squirrelmail squirrelmail_cpanels_version
wget http://cvf.net/modded_cpanel-sqmail-1.4.3-RC1.tar
tar -xvf modded_cpanel-sqmail-1.4.3-RC1.tar

Installation is now complete.

Load Squirrelmail from the control panel. Make sure its enabled via the tweaks option in WHM if you want to use it. Make sure the initial login is 1.4.3-RC1 when logging into Squirrelmail.

To add plugins, download the plugin to /usr/local/cpanel/base/3rdparty/squirrelmail/plugins and configure it according to the docs.

To install a plugin for use with Squirrelmail, cd /usr/local/cpanel/base/3rdparty/squirrelmail and run ./configure to add the new plugin to Squirrelmail.

Save, load, test then rejoice!

To prevent Cpanel updates from ruining your installation:

cd /usr/local/cpanel/base/3rdparty
chattr +i squirrelmail

If something gets screwed up and you want to revert back to the old Cpanel version, not likely, simply;

rm -rf squirrelmail
mv squirrelmail_cpanels_version squirrelmail

-EOF
aussie
Bug fix!

If you downloaded the above last night or today and installed it before seeing this message please re-download the file and re-install it.

Sorry i left out something very important from the .tar.

If you have not installed this Squirrelmail replacement, following the HOWTO above to install it.

If you have already installed the above, following this to re install it.

cd /usr/local/cpanel/base/3rdparty
chattr -i squirrelmail
rm -rf squirrelmail
wget http://cvf.net/modded_cpanel-sqmail-1.4.3-RC1.tar
tar -xvf modded_cpanel-sqmail-1.4.3-RC1.tar
chattr +i squirrelmail

Thats it! Test!
aussie
So? Anyone?
Scrumpy
Hey Aussie - Rough weekend for me but I'll be attempting this upgrade later today.

Thanks for all the help you offer here in the forums. icon_cool.gif
cyberrob
I tried this install very straight forward as far as I can see nothing really to go wrong. The best thing now is being able to install plugins, there are a couple I always like but overall there is not much difference between the current version and the new one.
aussie
QUOTE
Originally posted by cyberrob
I tried this install very straight forward as far as I can see nothing really to go wrong. The best thing now is being able to install plugins, there are a couple I always like but overall there is not much difference between the current version and the new one.


Ah but there is a major difference.

1) Squirrelmail 1.4.0 could allow you to get hacked. Its quite vulnarable.
2) Many bug fixes and your running the latest version.
3) As mentioned you now have the ability to add your own plugins.
4) Etc etc.
Lostnode
Ok, I installed it, good job, one hitch however...

With 1.4.0, each users data got stored in /home/user/.squirreldata

This was cool, since each person had only access to their onw stuff, and if they had a HUGE addressbook, it showed up in theru quota...

Now, with your version 1.4.3-RC, it all goes into one folder

/usr/local/cpanel/base/3rdparty/squirrelmail/data/

Making me, the addmin, have to move everyones data to a central location... with about 50 clients, its a lot fo work... having to one, go into each and every directory, copying it to the new directory, then haveing to chown em all from root, to their usernames.

Not fun... maybe you can fix that for oters.

Matt
Website Rob
Although it sounds great to be able to upgrade SquirrelMail (as we have no idea when DarkOrb will be doing it), have you, aussie, been able to confirm the situation outlined by Lostnode?

Probably the better of two evils, to have SquirrelMail data moved to Server storage as opposed to User and less chance of being hacked through it, but always best to have User specific files owned by the User.
aussie
QUOTE
Originally posted by Lostnode
Ok, I installed it, good job, one hitch however...

With 1.4.0, each users data got stored in /home/user/.squirreldata

This was cool, since each person had only access to their onw stuff, and if they had a HUGE addressbook, it showed up in theru quota...

Now, with your version 1.4.3-RC, it all goes into one folder

/usr/local/cpanel/base/3rdparty/squirrelmail/data/

Making me, the addmin, have to move everyones data to a central location... with about 50 clients, its a lot fo work... having to one, go into each and every directory, copying it to the new directory, then haveing to chown em all from root, to their usernames.

Not fun... maybe you can fix that for oters.

Matt


Your wrong. With 1.4.3-RC all users data is still in /home/user/.squirreldata and thats where its supposed to be. My installation did not change that. If yours is going to /usr/local/cpanel/base/3rdparty/squirrelmail/data/ then you must have installed your own version of Squirralmail somewhere else. My installation simply replaces Cpanels version but does not change the path to the data files.
aussie
QUOTE
Originally posted by Website Rob
Although it sounds great to be able to upgrade SquirrelMail (as we have no idea when DarkOrb will be doing it), have you, aussie, been able to confirm the situation outlined by Lostnode?

Probably the better of two evils, to have SquirrelMail data moved to Server storage as opposed to User and less chance of being hacked through it, but always best to have User specific files owned by the User.


What on earth is lostnode? :confused: Who are they?
Website Rob
Ok, seems to work fine for me and no changes from previous setup -- cpanel wise that is.

Question in the new index page. Where it has the red lettering for notice of update, does that change at some point or do we, the ServerAdmin, simply edit the index page to remove it?
aussie
Nope thats my modification to get the user to enter his/her reply to and name. Once its entered the user will never see that again.
Website Rob
Worked as advertised -- gotta love that. icon_wink.gif
Lostnode
I dunno what happened then becasue I had to move everything to the /usr/local/cpanel/base/3rdparty/squirrelmail/data/ folder for it to work... I didn't install my own version, I just followed what you said in your instructions. It might be becasue I am running the edge series of cPanel (needed a few new features) but other than that, nothing else.

Oh, and Aussie - I be lostnode icon_smile.gif
trepid
Thanks for that. Which file do I modify to set defaults for the font style, size, etc. that the user sees when they first login?

And will the Cpanel updates not over-write the newly installed version with the older version?
aussie
QUOTE
Originally posted by trepid
Thanks for that. Which file do I modify to set defaults for the font style, size, etc. that the user sees when they first login?

And will the Cpanel updates not over-write the newly installed version with the older version?


If you want to modify what is displayed to the user you will need to modify the php script called setup.php. Scroll to the bottom of the file and make your changes.

pico /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/askuserinfo/setup.php
aussie
QUOTE
Originally posted by Lostnode
I dunno what happened then becasue I had to move everything to the /usr/local/cpanel/base/3rdparty/squirrelmail/data/ folder for it to work... I didn't install my own version, I just followed what you said in your instructions.  It might be becasue I am running the edge series of cPanel (needed a few new features) but other than that, nothing else.

Oh, and Aussie - I be lostnode icon_smile.gif


Then you need to read my instructions again. I didnt say anything about the data folder at /usr/local/cpanel/base/3rdparty/squirrelmail/data/
aussie
Im working on a version of SQMail that adds about 40 plugins. Im thinking i will install it as part of my default Cpanel version. Just like above. Would anyone be interested in this when its ready?
aussie
QUOTE
Originally posted by Website Rob
Ok, seems to work fine for me and no changes from previous setup -- cpanel wise that is.

Question in the new index page. Where it has the red lettering for notice of update, does that change at some point or do we, the ServerAdmin, simply edit the index page to remove it?


See my msg to Trepid. Also, this is a plugin i modified for use with Cpanel. If you want to remove it simply remove the plugin by cd'ing into the Squirrelmail directory then execute ./configure. I think its option 8. If you want to leave it but just change the wording, edit the file i showed Trepid. I would leave it though. It forces every new user to enter a valid email from and reply-to.
harrisliu
QUOTE
Originally posted by aussie
Im working on a version of SQMail that adds about 40 plugins. Im thinking i will install it as part of my default Cpanel version. Just like above. Would anyone be interested in this when its ready?


I am interested , can you make a modded version with SQ mail 1.43a?
aussie
I did not get any feedback on this but I'd like to know if anyone is having issues with updating Cpanel using upcp?

It seems that if you chattr +i the squirrelmail directory upcp gets stuck updating and gets stuck because its trying to update squirrelmail back to the older Cpanel version.

cPanel Layer 2 Update Commencing
==> Running post install scripts....sync
syncing cpanel binaries
syncing perl libraries
syncing web host manager
syncing source files
syncing 3rdparty programs
syncing cgi-sys
syncing java-sys
syncing web based 3rdparty programs
<---- STOPS HERE!
trepid
Did you chattr +i the directory itself? :confused:
Lostnode
QUOTE
Originally posted by aussie
Then you need to read my instructions again. I didnt say anything about the data folder at  /usr/local/cpanel/base/3rdparty/squirrelmail/[b]data/ [/B]


I never said you did, I just said it didn't work untill I put the files there. After an installation, I had no address book, no pref files... I put the files there and it worked.
TechStar
any chance to see a 1.4.3a release?
aussie
QUOTE
Originally posted by TechStar
any chance to see a 1.4.3a release?


Not yet, im finishing up Urchin-Monitor then i may have time to get the latest version up to date.
Spokuz
How do you know the version of Squirremail?
stormy
Is this howto still current?
aussie
This howto is very old and should no longer be used.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.