View Full Version : HOWTO: Integrating NutsMail into cPanel (Global Installation)
Patrick 04-03-2007, 07:19 PM NutsMail (http://www.nutsmail.com) is an advanced skin for SquirrelMail that can be fully integrated into cPanel on a global level. While it's not free, it's well worth the money and your clients will love you!
Instead of writing a lengthy HOWTO with step-by-step instructions, it would make more sense to just provide two shell scripts that will do the job automatically. I'm not the best at writing shell scripts, so if you can do a better job - then do it! :)
---
Replace SquirrelMail with NutsMail:
#!/bin/sh
echo ""
echo "#"
echo "# NutsMail - cPanel Installation Script (Pat H)"
echo "#"
echo ""
echo "Enter the exact path to the NutsMail archive."
echo ""
echo -n "Location: "
read response
if [ -f "$response" ]; then
echo "Please wait..."
else
echo ""
echo "File does not exist!"
echo ""
exit
fi
cd /usr/local/cpanel/base/3rdparty/
mkdir nutsmail
cd nutsmail
cp $response /usr/local/cpanel/base/3rdparty/nutsmail/
tar -zxvf $response
echo ""
echo "Please wait..."
echo ""
sleep 1
cp -R /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/login_auth /usr/local/cpanel/base/3rdparty/nutsmail/plugins/login_auth
cd /usr/local/cpanel/base/3rdparty/
mv squirrelmail squirrelmail.cpanel
mv nutsmail squirrelmail
cd squirrelmail
cd config
cp config.php config.php.bak
sed -e '/'todo'/ a\
$plugins[25] = '\''login_auth'\'';' config.php >> config.php.new
cp config.php.new config.php
cp config_local.php config_local.php.bak
rm config_local.php
echo ""'<?php
$pw = posix_getpwuid(posix_getuid());
$data_dir = $pw["dir"] . '\'/.sqmaildata\'';
$attachment_dir = $data_dir;
mkdir($data_dir,0775);
$domain = $_SERVER['\'DNS\''];
if (getenv('WEBMAIL') == '\'1\'') {
$signout_page = '\'/webmaillogout.cgi\'';
} else {
$signout_page = '\''/'\'';
}
?>' >> config_local.php
cd /usr/local/cpanel/base/
sed -e '/SquirrelMail/ a\
<td align="center" valign="bottom" width="200">\
<a href="/3rdparty/squirrelmail/index.php"><img src="$webmail->{themebase}/images/squirrelmail_logo.gif" border="0"></a>\
<a href="/3rdparty/squirrelmail/index.php">NutsMail</a><br><font class="small">[NutsMail - Enhanced Webmail!]</font></td>\
' webmaillogin.cgi >> webmaillogin.cgi.new
cp webmaillogin.cgi.new webmaillogin.cgi
rm webmaillogin.cgi.new
chattr +i /usr/local/cpanel/base/webmaillogin.cgi
chattr -R +i /usr/local/cpanel/base/3rdparty/squirrelmail/
echo ""
echo "Installation finished!"
echo ""
<< removed by request >>
Instructions:
1) Upload the NutsMail archive to your server, then create a file called nutsmail.sh and paste the (above) desired shell script into it.
2) cp /usr/local/cpanel/base/webmaillogin.cgi /usr/local/cpanel/base/webmaillogin.cgi.bak
3) sh nutsmail.sh
4) You will then be asked to enter in the exact location to your NutsMail archive.
5) After you enter in the exact location, hit enter and you should see a long list of files being extracted and a bunch of modifications taking place.
6) Assuming no error messages were present, you should now be able to access cPanel's webmail interface where NutsMail has been installed.
---
Known Issues:
1) cPanel cannot parse XML files, so the WYSIWG editor is broken by default. I'm writing a shell script to fix this, however it'll only work for IE... A workaround for FireFox is still being looked into?
2) If you have cPanel set to automatically update, there is a good chance that the modifications made to webmaillogin.cgi will be lost. You can try the following workaround:
Linux: chattr +i /usr/local/cpanel/base/webmaillogin.cgi
FreeBSD: chflags schg /usr/local/cpanel/base/webmaillogin.cgi
3) These modifications will only work for cPanel v10 - not cPanel v11 (EDGE?). I'm still working on new shell scripts for cPanel v11 which should be out soon...
---
Disclaimer:
While I have used both of these scripts to install NutsMail on numerous servers without any issues, I take absolutely no responsibility for any damage that may occur!
---
Have a Problem?
Post any issues you may encounter here, and I'll do my best to help you out... within reason of course. :)
tumble 04-04-2007, 01:14 AM i e-mailed these guys to see if there software would work with RVskins. They never answered. Would you happen to know?
Plus i am running Edge so if and when you get it to worrk properly let em know.
thanks
tumble
Patrick 04-04-2007, 02:00 PM If you replace SquirrelMail with NutsMail, then by default it will work with RVSkin. In order to have it work alongside SquirrelMail, the theme(s) will have to be manually modified.
Once the EDGE scripts are complete, I will post them here. :)
tumble 04-04-2007, 02:16 PM i dont think i would want to replace completly since clients already have data in the SQMail mail system. And i am unsure how to transfer that data into a seperate E-mal package. If you have any thoughts on that proccess please let em know.
What themes are you saying need to be modded the SQMail or the RVskins?
Thanks for your work in this area. Always nice to see someone go the extra mile just to help others out.
tumble
Patrick 04-05-2007, 01:33 PM Part of my shell script modifies NutsMail to use the default SquirrelMail setup without any loss of data. Even if you run NutsMail alongside SquirrelMail, they are both ultimately using the same settings, address book and email folders.
As for the themes, if you decide to have NutsMail alongside SquirrelMail then a link would have to be added to the "Read Webmail" section. However, that section is only for the cPanel login - not individual email accounts (if that makes sense). IMO, it's a useless feature anyway. :)
Since RVSkin is actually using cPanel's webmail interface, then these shell scripts will still work without any issues.
tumble 04-05-2007, 02:09 PM Pat,
Thanks again for your hard work. You are correct in that RVskins uses cpanels webmail interface. RVskins links into the X3 series for the webmail interface.
As far as modifying the themes it a seems if NutsMail uses the default SquirrelMail set-up then the script would be spot perferct the way it is intented. IE replacing SQMail with NutsMail.
Pretty exciting stuff for sure.
tumble
BonsaiRack 05-30-2007, 08:59 AM Ill post my results here :
I have tried to installed this, but failed two times before I got it rigth. My first 2 fails were due to me enetering only the directory path (/home/user/) to the archive rather then (/home/user/archive.tgz)
Third time I got it right.
It installed itself just fine. However, When I log into webmail I get these options:
Horde - Squirrelmail - Nutsmail - Nutsmail - Nutsmail
I believe it has to do with my 2 failing and modification to webmaillogin.cgi . So I then recopied the backup webmaillogin.cgi.
Now I only have the se options :
Horde - Squirrelmail
However, even if I dont have Nutsmail, the skin for quirrelmail is working.
Another thing, when I enter : domain.com/webmail , I get a log in popup. I enter my credential, which takes me to a page with Horde and Squirrelmail for option. When I choose squirrelmail, I am taken to another login page but this time it is the nutsmail screen. Any way to avoid these multiple login ?
Thanks
Patrick
BonsaiRack 05-31-2007, 09:52 AM My installation always finish like this :
INSTALLATION.txt
AUTHORS
configure
COPYING
README
UPGRADE
Please wait...
cp: cannot stat `/usr/local/cpanel/base/3rdparty/squirrelmail/plugins/login_auth': No such file or directory
mv: cannot overwrite directory `squirrelmail.cpanel/squirrelmail'
cp: cannot create regular file `webmaillogin.cgi': Permission denied
Installation finished!
Patrick 05-31-2007, 12:19 PM Hi Patrick,
I'm going to modify the shell scripts above to stop the installation if the archive path is incorrect, or it will (as in your case) create multiple entries under the webmail interface.
As for the double login, that would be due to login_auth not being found on your installation. I'm not sure why that is since it's standard with all SquirrelMail packages in cPanel.
Could you run the following:
ls -la /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/
Also, which shell script did you use? The one to replace SquirrelMail or the one to add NutsMail alongside it?
Vinayak_Sharma 05-31-2007, 12:42 PM camay123 have you already installed RoundCube?
Check attributes of webmaillogin.cgi and other file and directories.
BonsaiRack 05-31-2007, 01:04 PM Could you run the following:
ls -la /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/
Also, which shell script did you use? The one to replace SquirrelMail or the one to add NutsMail alongside it?
Here is the result :
root@juris [~]# ls -la /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/
total 152
drwxr-xr-x 35 root root 4096 May 11 15:01 ./
drwxr-xr-x 17 root root 4096 May 31 09:48 ../
drwxr-xr-x 4 root root 4096 May 11 15:00 abook_group/
drwxr-xr-x 2 root root 4096 May 11 15:00 abook_take/
drwxr-xr-x 2 root root 4096 May 11 15:00 administrator/
drwxr-xr-x 2 root root 4096 May 11 15:00 bookmarks/
drwxr-xr-x 2 root root 4096 May 11 15:00 bug_report/
drwxr-xr-x 2 root root 4096 May 11 15:00 calendar/
drwxr-xr-x 2 root root 4096 May 11 15:00 calendar_sql_backend/
drwxr-xr-x 6 root root 4096 May 11 15:00 check_quota/
drwxr-xr-x 5 root root 4096 May 11 15:00 compatibility/
drwxr-xr-x 2 root root 4096 May 11 15:00 delete_move_next/
drwxr-xr-x 3 root root 4096 May 11 15:00 filters/
drwxr-xr-x 2 root root 4096 May 11 15:00 fortune/
drwxr-xr-x 7 root root 4096 May 11 15:00 gpg/
drwxr-xr-x 7 root root 4096 May 11 15:01 html_mail/
-rw-r--r-- 1 root root 480 May 11 06:54 index.php
drwxr-xr-x 2 root root 4096 May 11 15:01 info/
drwxr-xr-x 2 root root 4096 May 11 15:01 listcommands/
drwxr-xr-x 2 root root 4096 May 11 15:01 login_auto/
drwxr-xr-x 2 root root 4096 May 11 15:01 mail_fetch/
-rw-r--r-- 1 root root 3130 Aug 2 2006 make_archive.pl
drwxr-xr-x 2 root root 4096 May 11 15:01 message_details/
drwxr-xr-x 4 root root 4096 May 11 15:01 msg_flags/
drwxr-xr-x 3 root root 4096 May 11 15:01 newmail/
drwxr-xr-x 4 root root 4096 May 11 15:01 notes/
drwxr-xr-x 5 root root 4096 May 11 15:01 preview_pane/
-rw-r--r-- 1 root root 945 Aug 2 2006 README.plugins
drwxr-xr-x 2 root root 4096 May 11 15:01 sent_subfolders/
drwxr-xr-x 3 root root 4096 May 11 15:01 show_user_and_ip/
drwxr-xr-x 2 root root 4096 May 11 15:01 smallcal/
drwxr-xr-x 2 root root 4096 May 11 15:01 spamcop/
drwxr-xr-x 5 root root 4096 May 11 15:01 squirrelspell/
drwxr-xr-x 4 root root 4096 May 11 15:01 tbaddr/
drwxr-xr-x 2 root root 4096 May 11 15:01 todo/
drwxr-xr-x 2 root root 4096 May 11 15:01 translate/
drwxr-xr-x 3 root root 4096 May 11 15:01 view_as_html/
drwxr-xr-x 3 root root 4096 May 11 15:01 vlogin/
root@juris [~]#
[/QUOTE]
I have used the one that should be replacing squirrelmail.
BonsaiRack 05-31-2007, 01:06 PM camay123 have you already installed RoundCube?
Check attributes of webmaillogin.cgi and other file and directories.
No. Not installed Roundcube.
What would be the needed attributes ?
Patrick 05-31-2007, 01:32 PM Hrm, can you do a:
ls -la /usr/local/cpanel/base/3rdparty/
BonsaiRack 05-31-2007, 03:52 PM Hrm, can you do a:
ls -la /usr/local/cpanel/base/3rdparty/
Here it is :
root@juris [~]# ls -la /usr/local/cpanel/base/3rdparty/
total 224
drwxr-xr-x 8 root root 4096 May 31 09:48 ./
drwxr-xr-x 16 root root 4096 May 31 09:48 ../
-rw-r--r-- 1 root root 89721 Apr 25 23:02 .cpanelsync
-rw-r--r-- 1 root root 97384 Apr 25 23:02 .cpanelsync.md5s
drwx------ 10 cpanel cpanel 4096 Apr 25 23:02 phpMyAdmin/
lrwxrwxrwx 1 root root 11 Mar 14 18:28 phpMyAdminRR -> phpMyAdmin//
drwxr-xr-x 11 cpanel cpanel 4096 Mar 14 18:28 phpPgAdmin/
lrwxrwxrwx 1 root root 57 Mar 14 18:40 rvskin -> /usr/local/cpanel/3rdparty/lib/php/rvlibs/3rdparty/rvskin/
drwxr-xr-x 17 root root 4096 May 31 09:48 squirrelmail/
drwxr-xr-x 18 cpanel cpanel 4096 May 30 08:41 squirrelmail.cpanel/
drwxr-xr-x 3 root root 4096 Mar 14 18:28 WysiwygPro/
drwxr-xr-x 2 root root 4096 Mar 14 18:28 WysiwygPro-docs/
root@juris [~]#
BonsaiRack 06-01-2007, 11:17 AM I have found the solution to my login problem.
I copied /usr/local/cpanel/base/3rdparty/squirrelmail.cpanel/plugins/login_auth/
to
/usr/local/cpanel/base/3rdparty/squirrelmail/plugins/
And it is now login without asking twice for identification.
BonsaiRack 06-06-2007, 09:09 AM Nevermind.
BonsaiRack 06-06-2007, 09:27 AM oops...cannot edit previous message, so here it goes:
After the Cpanel11 update, nutsmail was gone.
I redid the first script and it did not work. I got two errors:
Unable to "mv squirrelmail squirrelmail.cpanel"
Unable to to create webmaillogin.cgi : permission denied.
So I did this :
mv /usr/local/cpanel/base/3rdparty/squirrelmail.cpanel /usr/local/cpanel/base/3rdparty/squirrelmail.cpanel10
Redid first script, Skin is back. However still got the error:
Please wait...
cp: cannot create regular file `webmaillogin.cgi': Permission denied
Installation finished!
So I guess that the last mod of webmaillogin.cgi did not work, Since at the login screen I dont see any changes.
Patrick
Patrick 06-06-2007, 10:35 AM Hi Patrick,
Thank you for confirming that the script above does work for cPanel 11. A developer from cPanel originally told me that it wouldn't work, however I never actually tested it until a few minutes ago.
As for the permission denied error, that would be due to the chattr +i flag that is set to prevent any changes to the file during cPanel updates. If you are replacing SquirrelMail with NutsMail then you don't need to remove the flag. However, if for some reason you do need to remove the flag, run the following:
chattr -i /usr/local/cpanel/base/webmaillogin.cgi
Then to turn it back on:
chattr +i /usr/local/cpanel/base/webmaillogin.cgi
Vinayak_Sharma 06-06-2007, 11:24 AM As today Release version of cPanel 11 has been released, more confirmation may pour in.
BonsaiRack 06-07-2007, 08:38 AM Well, I came back this morning, and squirrelmail was back to it's original form. Would that be cause by the cpanel automatic overnigth update ?
Patrick 06-07-2007, 11:19 AM Hi Patrick,
If you run the following command it should prevent cPanel from replacing NutsMail with the default SquirrelMail:
chattr -R +i /usr/local/cpanel/base/3rdparty/squirrelmail/
Make sure you run the above command after NutsMail has been reinstalled.
Patrick 06-11-2007, 09:49 AM The first shell script to replace SquirrelMail with NutsMail has been updated:
- If the NutsMail archive does not exist, the shell script will exit and nothing further will be done.
- The shell script will also prevent cPanel from removing NutsMail and replacing it with the original SquirrelMail during any updates. (Linux only)
- Confirmed to work on cPanel v11.
utropicmedia-karl 07-10-2007, 03:55 PM were you able to get the GPG plugin working? We keep getting errors in the GPG config file.
Patrick 07-10-2007, 06:25 PM were you able to get the GPG plugin working? We keep getting errors in the GPG config file.
I assume you're getting the warning message about certain files not being found?
Fix:
cd /path/to/nutsmail/plugins
mv gpg gpg.bak
wget "http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fgpg-2.1.tar.gz"
tar -xvf gpg-2.1.tar.gz
That will allow the GPG configuration screen to work, however the initial screen appears to be lacking the correct theme (you'll see what I mean) but the other pages look fine.
Also, the key generation feature does not work, at least for me... but I can still import private & public keys without any issues.
Edit:
You may also have to comment out the smallcal plugin under /path/to/nutsmail/config/config.php ... not sure why that is causing a problem.
I'll see if I can figure out these issues...
utropicmedia-karl 07-10-2007, 06:38 PM we get this:
Fatal error: Cannot redeclare sq_change_text_domain() (previously declared in /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/compatibility/includes/1.5.2/global.php:587) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/i18n.php on line 47
even after a fresh gpg plugin install. Any thoughts?
Patrick 07-10-2007, 06:46 PM we get this:
Fatal error: Cannot redeclare sq_change_text_domain() (previously declared in /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/compatibility/includes/1.5.2/global.php:587) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/i18n.php on line 47
even after a fresh gpg plugin install. Any thoughts?
Hrm, I'm not able to recreate that.
Can you post the version:
cat /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/compatibility/version
utropicmedia-karl 07-11-2007, 03:17 PM Figured it out: register_globals was on so the functions were stepping on each other.
Fix it in 3rdparty/etc/php.ini and the GPG plugin works fully - even key generation.
Regards,
Patrick 07-12-2007, 09:55 PM Figured it out: register_globals was on so the functions were stepping on each other.
Ah, you are correct! :agree:
Patrick 07-19-2007, 02:18 PM Figured it out: register_globals was on so the functions were stepping on each other.
Just a warning... but I noticed that with register_globals off, Fantastico De Luxe will not function at all.
utropicmedia-karl 07-19-2007, 03:11 PM Just a warning... but I noticed that with register_globals off, Fantastico De Luxe will not function at all.
Works on our servers.
cp11
centos5
apache 1.3+ php5.2+
Patrick 07-19-2007, 03:20 PM Works on our servers.
cp11
centos5
apache 1.3+ php5.2+
Ah, it might be related to FreeBSD then.
I just disabled register_globals (again) and while Fantastico does load, if you try and install a software package it returns:
"This application is currently not available. Please contact your host."
The cPanel error log shows that it tried to use RPM, which of course is not available (by default) in FreeBSD.
yeknom 07-20-2007, 08:54 AM Hi i have done a server wide installation of NutsMail and enabled the GPG plug-in but it doesn't show up in the OPTIONS section?
Any idea how to get this to work/show up?
Thanks!!
Patrick 07-20-2007, 11:14 AM Hi i have done a server wide installation of NutsMail and enabled the GPG plug-in but it doesn't show up in the OPTIONS section?
Any idea how to get this to work/show up?
Thanks!!
If you enabled it under config.php, did you put it before html_mail?
Example:
$plugins[22] = 'gpg';
$plugins[23] = 'html_mail';
yeknom 07-20-2007, 12:23 PM I currently have it like this
$plugins[14] = 'preview_pane';
$plugins[15] = 'gpg';
$plugins[16] = 'newmail';
$plugins[17] = 'spamcop';
$plugins[18] = 'message_details';
$plugins[19] = 'html_mail';
$plugins[20] = 'view_as_html';
$plugins[21] = 'notes';
is that correct?
utropicmedia-karl 07-20-2007, 01:23 PM run the sq mail configure script and enable the plugin. not that there is an error in the script when you save it puts quotes incorrectly around a variable on line 30.
RDOSTI 08-30-2007, 02:35 AM Does the 2nd script work with CPanel 11 ?
RDOSTI 08-30-2007, 02:57 AM cp: missing destination file
Try `cp --help' for more information.
nutsmail.sh: line 32: /usr/local/cpanel/base/3rdparty/nutsmail/plugins/login_auth: No such file or directory
mv: cannot move `squirrelmail' to `squirrelmail.cpanel': Operation not permitted
mv: cannot move `nutsmail' to `squirrelmail/nutsmail': Permission denied
cp: cannot create regular file `config.php.bak': Permission denied
nutsmail.sh: line 40: config.php.new: Permission denied
cp: cannot create regular file `config.php': Permission denied
cp: cannot create regular file `config_local.php.bak': Permission denied
rm: remove write-protected regular file `config_local.php'? yes
rm: cannot remove `config_local.php': Permission denied
nutsmail.sh: line 61: config_local.php: Permission denied
sed: -e expression #1, char 158: unknown option to `s'
Cpanel 11 Current (what should i do)
Compatibility
2.0.7-1.0
:(
RDOSTI 08-30-2007, 03:21 AM Message not sent. Server replied:
Connection timed out
110 Can't open SMTP stream.
is what i get during sending emails now :(
Patrick 08-30-2007, 10:39 AM Does the 2nd script work with CPanel 11 ?
No, the second shell script does not work with cPanel 11. I haven't had time to update it yet, however the first one will work fine.
Patrick 08-30-2007, 10:44 AM cp: missing destination file
Try `cp --help' for more information.
nutsmail.sh: line 32: /usr/local/cpanel/base/3rdparty/nutsmail/plugins/login_auth: No such file or directory
mv: cannot move `squirrelmail' to `squirrelmail.cpanel': Operation not permitted
mv: cannot move `nutsmail' to `squirrelmail/nutsmail': Permission denied
cp: cannot create regular file `config.php.bak': Permission denied
nutsmail.sh: line 40: config.php.new: Permission denied
cp: cannot create regular file `config.php': Permission denied
cp: cannot create regular file `config_local.php.bak': Permission denied
rm: remove write-protected regular file `config_local.php'? yes
rm: cannot remove `config_local.php': Permission denied
nutsmail.sh: line 61: config_local.php: Permission denied
sed: -e expression #1, char 158: unknown option to `s'
Cpanel 11 Current (what should i do)
Compatibility
2.0.7-1.0
:(
Did you run the second shell script followed by the first one? Your best bet would be to do the following:
cd /usr/local/cpanel/base/3rdparty/
mv squirrelmail squirrelmail.OLD
/scripts/upcp
The last command will update cPanel and force the re-installation of SquirrelMail. As for NutsMail, I would advise not installing the software alongside SquirrelMail until the second script is updated.
RDOSTI 08-30-2007, 12:07 PM mv squirrelmail squirrelmail.OLD
mv: cannot move `squirrelmail' to `squirrelmail.OLD': Operation not permitted
Patrick 08-30-2007, 12:28 PM mv squirrelmail squirrelmail.OLD
mv: cannot move `squirrelmail' to `squirrelmail.OLD': Operation not permitted
Run the following:
chattr -R -i /usr/local/cpanel/base/3rdparty/squirrelmail
cd /usr/local/cpanel/base/3rdparty/
mv squirrelmail squirrelmail.OLD
/scripts/upcp
RDOSTI 08-30-2007, 12:31 PM cp: missing destination file
Try `cp --help' for more information.
nutsmail.sh: line 32: /usr/local/cpanel/base/3rdparty/nutsmail/plugins/login_auth: No such file or directory
sed: -e expression #1, char 158: unknown option to `s'
Installation finished!
SM HTML editor doesnt load either :( Followe above instructions
Patrick 08-30-2007, 12:37 PM What shell script is that?
Just to confirm:
ls -la /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/ | grep auth
Does it return any results?
RDOSTI 08-30-2007, 12:38 PM no result...was it supposed to
RDOSTI 08-30-2007, 12:40 PM im installing for - 1.4.10a_NM-9.Bluehive.tgz
(just confirming this is the right file)
Patrick 08-30-2007, 12:43 PM no result...was it supposed to
Yeah, there's supposed to be a directory there called login_auth which is somewhat important to the NutsMail installation.
After you ran /scripts/upcp did the SquirrelMail directory get reinstalled?
ls -al /usr/local/cpanel/base/3rdparty/squirrelmail/
RDOSTI 08-30-2007, 12:48 PM Yes it did. But that login_auth thing didnt. (using cpanel edge)
-rwxr-xr-x 1 root root 2326729 Aug 30 22:10 1.4.10a_NM-9.Bluehive.tgz
-rw-r--r-- 1 root root 8278 Dec 20 2006 AUTHORS
-rw-r--r-- 1 root root 78728 May 11 15:21 ChangeLog
drwxr-xr-x 5 root root 4096 May 12 00:30 class
drwxr-xr-x 2 root root 4096 Aug 30 22:10 config
-rw-r--r-- 1 root root 102 Aug 2 2006 configure
drwxr-xr-x 3 root root 4096 May 12 00:30 contrib
-rw-r--r-- 1 root root 15228 Aug 2 2006 COPYING
drwxr-xr-x 2 root root 4096 May 12 00:30 data
drwxr-xr-x 4 root root 4096 May 12 00:30 functions
drwxr-xr-x 3 root root 4096 May 12 00:30 help
drwxr-xr-x 2 root root 4096 May 12 00:38 images
drwxr-xr-x 3 root root 4096 May 12 00:30 include
-rw-r--r-- 1 root root 696 May 11 15:20 index.php
-rw-r--r-- 1 root root 8810 May 11 15:20 INSTALL
-rw-r--r-- 1 root root 3194 Apr 17 01:03 INSTALLATION.txt
drwxr-xr-x 2 root root 4096 May 12 00:30 locale
drwxr-xr-x 35 root root 4096 May 12 00:32 plugins
drwxr-xr-x 2 root root 4096 May 12 00:32 po
-rw-r--r-- 1 root root 2635 Aug 2 2006 README
-rw-r--r-- 1 root root 5065 May 11 15:20 ReleaseNotes
drwxr-xr-x 3 root root 4096 May 12 00:46 skins
drwxr-xr-x 2 root root 4096 May 17 21:43 src
drwxr-xr-x 3 root root 4096 May 12 00:46 themes
-rw-r--r-- 1 root root 4718 Aug 2 2006 UPGRADE
Patrick 08-30-2007, 01:02 PM Interesting, can you run the following:
ls -la /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/
I just want to double check that Edge has the same plugins as Current before I start working on a solution.
RDOSTI 08-30-2007, 01:08 PM [root@server ~]# ls -la /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/
total 152
drwxr-xr-x 35 root root 4096 May 12 00:32 .
drwxr-xr-x 16 root root 4096 Aug 30 22:35 ..
drwxr-xr-x 4 root root 4096 May 12 00:30 abook_group
drwxr-xr-x 2 root root 4096 May 12 00:30 abook_take
drwxr-xr-x 2 root root 4096 May 12 00:30 administrator
drwxr-xr-x 2 root root 4096 May 12 00:30 bookmarks
drwxr-xr-x 2 root root 4096 May 12 00:30 bug_report
drwxr-xr-x 2 root root 4096 May 12 00:31 calendar
drwxr-xr-x 2 root root 4096 May 12 00:31 calendar_sql_backend
drwxr-xr-x 6 root root 4096 May 12 00:31 check_quota
drwxr-xr-x 5 root root 4096 May 12 00:31 compatibility
drwxr-xr-x 2 root root 4096 May 12 00:31 delete_move_next
drwxr-xr-x 3 root root 4096 May 12 00:31 filters
drwxr-xr-x 2 root root 4096 May 12 00:31 fortune
drwxr-xr-x 7 root root 4096 May 12 00:31 gpg
drwxr-xr-x 7 root root 4096 May 12 00:31 html_mail
-rw-r--r-- 1 root root 480 May 11 16:24 index.php
drwxr-xr-x 2 root root 4096 May 12 00:31 info
drwxr-xr-x 2 root root 4096 May 12 00:31 listcommands
drwxr-xr-x 2 root root 4096 May 12 00:31 login_auto
drwxr-xr-x 2 root root 4096 May 12 00:31 mail_fetch
-rw-r--r-- 1 root root 3130 Aug 2 2006 make_archive.pl
drwxr-xr-x 2 root root 4096 May 12 00:31 message_details
drwxr-xr-x 4 root root 4096 May 12 00:31 msg_flags
drwxr-xr-x 3 root root 4096 May 12 00:31 newmail
drwxr-xr-x 4 root root 4096 May 12 00:31 notes
drwxr-xr-x 5 root root 4096 May 12 00:31 preview_pane
-rw-r--r-- 1 root root 945 Aug 2 2006 README.plugins
drwxr-xr-x 2 root root 4096 May 12 00:31 sent_subfolders
drwxr-xr-x 3 root root 4096 May 12 00:31 show_user_and_ip
drwxr-xr-x 2 root root 4096 May 12 00:31 smallcal
drwxr-xr-x 2 root root 4096 May 12 00:31 spamcop
drwxr-xr-x 5 root root 4096 May 12 00:32 squirrelspell
drwxr-xr-x 4 root root 4096 May 12 00:32 tbaddr
drwxr-xr-x 2 root root 4096 May 12 00:32 todo
drwxr-xr-x 2 root root 4096 May 12 00:32 translate
drwxr-xr-x 3 root root 4096 May 12 00:32 view_as_html
drwxr-xr-x 3 root root 4096 May 12 00:32 vlogin
RDOSTI 08-30-2007, 01:11 PM I get everything working if I install the Nutsmail alone into a /mail or /email folder on the website - then everything works (perfect functionality) except now and then some session error and something about quota exceeding (though it hasnt exceeded)
Patrick 08-30-2007, 01:20 PM I get everything working if I install the Nutsmail alone into a /mail or /email folder on the website - then everything works (perfect functionality) except now and then some session error and something about quota exceeding (though it hasnt exceeded)
Yeah, it'll work fine under a normal directory with Apache but these shell scripts (at least the first one) will allow people to access it via cPanel.
If you want to get it to work under cPanel using the first shell script, try this:
cd /usr/local/cpanel/base/3rdparty/squirrelmail/plugins
wget http://www.failover.ca/login_auth.zip
unzip login_auth.zip
Then rerun the first shell script and it should work fine, now that the login_auth directory is present.
RDOSTI 08-30-2007, 01:25 PM after the above i get
cp: missing destination file
Try `cp --help' for more information.
nutsmail.sh: line 32: /usr/local/cpanel/base/3rdparty/nutsmail/plugins/login_auth: No such file or directory
mv: cannot overwrite directory `squirrelmail.cpanel/squirrelmail'
sed: -e expression #1, char 191: unknown command: `<'
cp: cannot create regular file `webmaillogin.cgi': Permission denied
-----------------
nutsmail.sh: line 32: /usr/local/cpanel/base/3rdparty/nutsmail/plugins/login_auth ----
wait .. isnt hte problem NUTSMAIL/plugins?
It should be squirrelmail/plugins!!!??
Regards
Patrick 08-30-2007, 01:45 PM It should be squirrelmail/plugins!!!??
Yeah, that's where the login_auth directory should go.
There appears to be something else going on with your installation, so lets try starting off from scratch:
cd /usr/local/cpanel/base/3rdparty/
rm -rf nutsmail
rm -rf squirrelmail
mv squirrelmail.cpanel squirrelmail
ls -la squirrelmail/plugins/login_auth
If you get a directory listing, follow the next steps:
wget http://www.failover.ca/nutsmail-replace.sh
chattr -i /usr/local/cpanel/base/webmaillogin.cgi
sh nutsmail-replace.sh
Give the exact path to 1.4.10a_NM-9.Bluehive.tgz and hit enter.
RDOSTI 08-30-2007, 01:54 PM : command not found: line 7:
Enter the exact path to the NutsMail archive.
': not a valid identifier 11: read: `response
nutsmail-replace.sh: line 76: syntax error: unexpected end of file
Patrick 08-30-2007, 01:58 PM : command not found: line 7:
Enter the exact path to the NutsMail archive.
': not a valid identifier 11: read: `response
nutsmail-replace.sh: line 76: syntax error: unexpected end of file
Sorry, re-download the file:
wget http://www.failover.ca/nutsmail-replace.sh
My file editor put a bunch of extra characters in there... :(
RDOSTI 08-30-2007, 02:05 PM mv: cannot move `squirrelmail' to `squirrelmail.cpanel': Operation not permitted
mv: cannot move `nutsmail' to `squirrelmail/nutsmail': Permission denied
nutsmail-replace.sh.1: line 36: cd: config: No such file or directory
cp: cannot create regular file `config.php.bak': Permission denied
nutsmail-replace.sh.1: line 39: config.php.new: Permission denied
cp: cannot create regular file `config.php': Permission denied
cp: cannot create regular file `config_local.php.bak': Permission denied
rm: remove write-protected regular file `config_local.php'?
RDOSTI 08-30-2007, 02:07 PM cp: cannot stat `/usr/local/cpanel/base/3rdparty/squirrelmail/plugins/login_auth': No such file or directory
mv: cannot stat `squirrelmail': No such file or directory
RDOSTI 08-30-2007, 02:12 PM Okay ..here is whats going on.
Its installed after showing some errors.
When I login to webmail it shows Squirrelmail icon - after login i see the Nutsmail system HOWEVER
the plugins i see are
upto SpamCop - Spam Reporting one
There is NO HTML editor or spell check system and other parts that are included in the actual Nutsmail package...so wondering whats wrong.
Regards
Patrick 08-30-2007, 02:42 PM It's probably related to those permission denied errors, I'm not sure why you are getting them... those are definitely not from the shell scripts. :(
Try this one last time:
cd /usr/local/cpanel/base/3rdparty/
chattr -i /usr/local/cpanel/base/3rdparty
chattr -R -i /usr/local/cpanel/base/3rdparty/squirrelmail.cpanel
rm -rf nutsmail
rm -rf squirrelmail
mv squirrelmail.cpanel squirrelmail
cd squirrelmail/plugins
wget http://www.failover.ca/login_auth.zip
unzip login_auth.zip
ls -la squirrelmail/plugins/login_auth | grep functions.php
If you get a file result back, follow the next steps:
wget http://www.failover.ca/nutsmail-replace.sh
chattr -i /usr/local/cpanel/base/webmaillogin.cgi
sh nutsmail-replace.sh
Give the exact path to 1.4.10a_NM-9.Bluehive.tgz and hit enter. The bold above are the changes I made that should correct those permission denied errors...
RDOSTI 08-30-2007, 02:56 PM mv squirrelmail.cpanel squirrelmail
mv: cannot stat `squirrelmail.cpanel': No such file or directory
RDOSTI 08-30-2007, 03:03 PM Please wait...
Installation finished!
no error..checking now..
RDOSTI 08-30-2007, 03:06 PM Logged in fine...
ONly issue/s are now:
THE BELOW ARE THE OPTIONS
Personal Information Display Preferences
Message Highlighting Folder Preferences
Index Order Message Filters
SPAM Filters POP3 Fetch Mail
Translation Options SpamCop - Spam Reporting
However the actual software/script has other options such as
Html Editor Spell Check
Sound/Notification , NewMail Options, Address Autocompletion Options, SpellChecker Options
these are not seen in the one installed using this .sh script
Regards
Patrick 08-30-2007, 03:09 PM these are not seen in the one installed using this .sh script
Regards
The NutsMail team probably changed the configuration file around with the new versions, let me take a look at mine and see what can be done.
It should just be a matter of replacing a single file. :)
Patrick 08-30-2007, 03:16 PM Open the following file:
/usr/local/cpanel/base/3rdparty/squirrelmail/config/config.php
Do a search for $plugins[1] and you should see a list of 25 or so plugins, paste that entire list here.
RDOSTI 08-30-2007, 03:19 PM whats odd is when i install it standalone for 1 domain in a /email subfolder i get all the features from the same ziped file.
Anyhow,
//$plugins[0] = 'sqclock'; //not used
$plugins[1] = 'show_user_and_ip';
$plugins[2] = 'filters';
$plugins[3] = 'mail_fetch';
$plugins[4] = 'calendar';
$plugins[5] = 'abook_take';
$plugins[6] = 'administrator';
$plugins[7] = 'squirrelspell';
$plugins[8] = 'translate';
$plugins[9] = 'msg_flags';
$plugins[10] = 'bookmarks';
$plugins[11] = 'compatibility';
$plugins[12] = 'smallcal';
$plugins[13] = 'delete_move_next';
$plugins[14] = 'preview_pane';
$plugins[15] = 'html_mail';
$plugins[16] = 'newmail';
$plugins[17] = 'spamcop';
$plugins[18] = 'message_details';
//$plugins[19] = 'gpg'; //check gpg config details before enabling
$plugins[20] = 'view_as_html';
$plugins[21] = 'notes';
//$plugins[22] = 'calendar_sql_backend'; //enable and configure if needed
$plugins[23] = 'login_auto';
$plugins[24] = 'todo';
$plugins[25] = 'login_auth';
// $plugins[25] = 'check_quota'; //only works on some servers
$plugins[26] = 'tbaddr';
Regards
RDOSTI 08-30-2007, 03:24 PM do i need to chmod 777 for the data folder of squirrelmail (as per readme or not)
Regards
Patrick 08-30-2007, 03:38 PM do i need to chmod 777 for the data folder of squirrelmail (as per readme or not)
Regards
I don't think it would make a difference... I left the permissions alone and everything is working fine.
As for the plugins, try this:
cp /usr/local/cpanel/base/3rdparty/squirrelmail/config/config.php /usr/local/cpanel/base/3rdparty/squirrelmail/config/config.php.bak
Edit:
/usr/local/cpanel/base/3rdparty/squirrelmail/config/config.php
Find the $plugins list and replace all of them with the following list instead:
$plugins[1] = 'show_user_and_ip';
$plugins[2] = 'filters';
$plugins[3] = 'mail_fetch';
$plugins[4] = 'todo';
$plugins[5] = 'abook_take';
$plugins[6] = 'administrator';
$plugins[7] = 'squirrelspell';
$plugins[8] = 'translate';
$plugins[9] = 'msg_flags';
$plugins[10] = 'bookmarks';
$plugins[11] = 'compatibility';
$plugins[13] = 'delete_move_next';
$plugins[14] = 'preview_pane';
$plugins[16] = 'newmail';
$plugins[17] = 'spamcop';
$plugins[18] = 'message_details';
$plugins[19] = 'view_as_html';
$plugins[20] = 'notes';
$plugins[21] = 'login_auth';
$plugins[22] = 'gpg';
$plugins[23] = 'html_mail';
I'm not 100% sure, but I remember the list order had something to do with a previous plugin not working... but if this doesn't work, I'll have to get the latest Nutsmail to see what was changed.
RDOSTI 08-30-2007, 03:48 PM no change. :(
Patrick 08-30-2007, 05:55 PM I have requested that the second shell script be temporarily removed until the code is cleaned up and confirmed working with cPanel 11.
As for the plugins not working, I'm going to have to look into that one. I'll hopefully have a fix for the latest NutsMail by the end of this weekend? I'll be sure to work in more checks into these shell scripts to make sure they don't screw anything up, if they fail the first time... :)
Patrick 09-02-2007, 02:58 PM Just a minor update on the plugin issue, I have been able to recreate it under cPanel and I'm working on a fix right now.
I have also noticed a few other bugs (unrelated to my scripts) that should allow the WYSIWG editor to work correctly... as it kinda works but not quiet. :)
Edit:
The problem is directly related to the login_auth module... the same module that allows you to login via cPanel without having to login a second time. I'll see if I can come up with a work around, as this is a very important plugin for true cPanel integration.
Patrick 09-02-2007, 05:00 PM Here's a fix for the plugins not showing up and the WYSIWG editor:
Edit:
/usr/local/cpanel/base/3rdparty/squirrelmail/data/default_pref
Replace the contents with:
show_html_default=1
javascript_on=1
javascript_setting=1
compose_window_type=html
Now, if this is your first time logging into NutsMail everything will work as it should... however, if you have logged in before the old preferences may be used.
Preference Fix:
Login to NutsMail, go to Options and click on "Display Preferences" and make sure "Use Javascript" is set to always. Click the Submit button at the bottom to finish.
When I find some time, I'll be working these changes into the shell scripts above... and hopefully automate a few more things.
RDOSTI 09-13-2007, 01:50 AM How do i install plugins?
Suppose i like a plugin "abc" and want to install it.
DO i wget it over and install? (how and where) - eg. Archive emails feature plugin is amazing stuff (yahoo premium has it)
Regards
Patrick 09-13-2007, 10:06 AM How do i install plugins?
Suppose i like a plugin "abc" and want to install it.
DO i wget it over and install? (how and where) - eg. Archive emails feature plugin is amazing stuff (yahoo premium has it)
Regards
Download and extract the plugin to the following directory:
/usr/local/cpanel/base/3rdparty/squirrelmail/plugins
Open the SquirrelMail configuration:
/usr/local/cpanel/base/3rdparty/squirrelmail/config/config.php
Scroll down until you see the list of plugins, for example:
$plugins[23] = 'login_auto';
$plugins[24] = 'todo';
Then add the plugin in the same format with the next number, for example:
$plugins[23] = 'login_auto';
$plugins[24] = 'todo';
$plugins[25] = 'archive_email';
Replace 'archive_email' with the name of the directory that the plugin created when you were extracting everything.
orlando_myers 10-22-2007, 10:16 PM is this script now working properly with cpanel 11? can anyone confirm this?
orlando_myers 10-22-2007, 11:49 PM I used the original script in the beginning of the post on a cpanel 11 box and the only error i got is the error below. Any suggestion?
Please wait...
cp: missing destination file operand after `/usr/local/cpanel/base/3rdparty/squirrelmail/plugins/login_auth'
Try `cp --help' for more information.
nutsmail.sh: line 32: /usr/local/cpanel/base/3rdparty/nutsmail/plugins/login_auth: No such file or directory
sed: -e expression #1, char 158: unknown option to `s'
Installation finished!
Patrick 10-23-2007, 12:00 AM nutsmail.sh: line 32: /usr/local/cpanel/base/3rdparty/nutsmail/plugins/login_auth: No such file or directory
Ah, I remember someone else had this problem... I'm not sure if it was cPanel or NutsMail who made the change of removing login_auth...
1 minute while I grab login_auth and put it on a website, along with instructions on how to install it.
orlando_myers 10-23-2007, 12:04 AM thanks very much Pat H, await your respond
Patrick 10-23-2007, 12:08 AM Alright, try this:
cd /usr/local/cpanel/base/3rdparty/squirrelmail/plugins
wget http://www.failover.ca/login_auth.zip
unzip login_auth.zip
Then try to access SquirrelMail from cPanel, just to see if it's working... if it's not, I have another fix that will (hopefully) get it working in one go.
orlando_myers 10-23-2007, 12:38 AM this is weird. How is it possible that root have no permission on the plugins folder i am trying to wget the file but getting permission deny
[root@server plugins]# wget http://www.failover.ca/login_auth.zip
--23:31:59-- http://www.failover.ca/login_auth.zip
Resolving www.failover.ca... 72.9.158.201
Connecting to www.failover.ca|72.9.158.201|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11672 (11K) [application/zip]
login_auth.zip: Permission denied
Cannot write to `login_auth.zip' (Permission denied).
Don't think this is permission issue on my server because it appear permissions are set properly though i may be missing something please advice.
orlando_myers 10-23-2007, 12:49 AM so basically the whole problem is login_auth seem its not there at all
Patrick 10-23-2007, 05:43 AM Cannot write to `login_auth.zip' (Permission denied).
Ah right, the shell script chattrs the directory to prevent cPanel from overwriting it during routine updates.
Try this:
chattr -R -i /usr/local/cpanel/base/3rdparty/squirrelmail/
cd /usr/local/cpanel/base/3rdparty/squirrelmail/plugins
wget http://www.failover.ca/login_auth.zip
unzip login_auth.zip
Yeah, the login_auth module missing from the latest versions of NutsMail appears to be the problem here... I'll have to redo the shell script to download it, or at least ask the NutsMail team to put it back. It's essential to how everything operates with the cPanel integration.
orlando_myers 10-23-2007, 07:50 AM I take it i need to turn on back the chattr on the directory so i am doing that
orlando_myers 10-23-2007, 07:57 AM Ok now seem i dont have to login twice now thats good, when i click the squirrel mail then nuts mail comes up.
Here are the things i am wondering though, are there any interesting modules thats not installed by default thats good. Also anyway to have just the squirrel mail login and not the horde and squirrel mail also anyway to just go to www.domain.com/webmail and just get the nutsmail login
Patrick 10-23-2007, 09:53 AM Ok now seem i dont have to login twice now thats good, when i click the squirrel mail then nuts mail comes up.
Here are the things i am wondering though, are there any interesting modules thats not installed by default thats good. Also anyway to have just the squirrel mail login and not the horde and squirrel mail also anyway to just go to www.domain.com/webmail and just get the nutsmail login
I don't know of any "interesting" plugins off hand as most clients are pleased with what NutsMail comes bundled with. If you take a look at the following link, you can see what is available:
http://www.squirrelmail.org/plugins.php
Keep in mind that some of these plugins are old and no longer working, and some could be very tricky to install. SquirrelMail, while widely used around the world, could use some 'freshness' and new additions...
As for your second question, yes if you install NutsMail under one of your websites and configure it via the default NutsMail instructions, you can access it via a specific URL. I don't believe /webmail or /mail will work, as that is global to Apache because of cPanel... but you could call it something else.
One more thing, in order to prevent cPanel from overwriting your NutsMail installation run the following:
chattr -R +i /usr/local/cpanel/base/3rdparty/squirrelmail/
orlando_myers 10-24-2007, 01:51 AM Anyway to login straight through the nutsmail login instead of going through the cpanel and selecting squirrel mail. Also anyway to login with only username and not username@domain.com
Patrick 10-24-2007, 07:23 AM Anyway to login straight through the nutsmail login instead of going through the cpanel and selecting squirrel mail. Also anyway to login with only username and not username@domain.com
Do you want everyone to access NutsMail through one website, or all the websites on the server, while still bypassing cPanel?
blacke28 11-12-2007, 05:40 PM Hi, for me the WYSIWG editor is not working with cpanel 11, everything else is working fine.
blacke28 11-12-2007, 06:16 PM Hi, for me the WYSIWG editor is not working with cpanel 11, everything else is working fine.
It's working now...
tarzanna 11-18-2007, 04:58 PM Hi -
I just wanted to say that I was able to follow the instructions here and get everything working perfectly with cPanel 11. I purchased the x-Graphite skin with server installation, but I never heard back from them about the install and decided to just do it myself.
Your instructions were very easy to understand for someone who knows next to nothing about interfacing with the server via command prompt. Once I actually got up the nerve to try, it took less than a minute to install and confirm working. The only part I got confused about was where I should put the nutsmail.sh file...but I just uploaded it to the same location as the skin archive and modified the path from your instructions for calling the file.
To work around the problem of their new skins not having the login_auth plugin, I just added it to the skin archive within the plugin directory before uploading/installing (thanks for providing that login_auth.zip file).
Anyways, I just wanted to how much I appreciate you posting this info. I was getting impatient waiting for them to install it for me and it was much easier than I thought it would be.
dwscenter 11-19-2007, 04:33 AM I also bought Nutsmail, but one thing I found is that you can only use one them, if it is installed globally on a VPS and a resaler wants their own graphic on the login page can this be done? or does it only use the main graphic that is assigned in the setup file when you first set it up, the only way I saw around this is installation per domain. Like with RVSkin, a reseller ABC Company can have their name in there and their own headers, and all their clients see ABC Company , but ABC could be obtaining reseller services from XYZ :) thanks in advance for any help with this
Tom
RDOSTI 11-19-2007, 05:19 AM Im scared of doing this all over again. Had past issues..and had major headaches..>I would be extremely happy if someone can have the first post of the thread totally updated with the entire step by step process, a small FAQ / troubleshooting guide or something or just start a new POST called "Updated" and explain everything since the first thread/post is really old.
tarzanna 11-19-2007, 11:25 AM Im scared of doing this all over again. Had past issues..and had major headaches..>I would be extremely happy if someone can have the first post of the thread totally updated with the entire step by step process, a small FAQ / troubleshooting guide or something or just start a new POST called "Updated" and explain everything since the first thread/post is really old.
I understand your concern. I'd purchased one of their older skins a couple of years back and tried installing on a client site (not globally), it ended up overloading the server so my hosting provider had to disable it.
Now I have a dedicated server and was hopeful that their newer skins were coded better.
The instructions at the beginning of this post were last updated in August 2007, so they're pretty recent. Originally I think the post contained an alternate set of instructions for installing Nutsmail side-by-side SquirrelMail (instead of an outright replacement). He states in one of the threads that those instructions were removed because it was buggy and too many people were having problems.
After reading through this entire thread, these are the exact steps I took to replace SquirrelMail with Nutsmail (written for people, like me, who know nothing about shell scripts, SSH or command line administration):
1. Purchased & downloaded Nutsmail x-Graphite skin
(My exact file was 1.4.11_NM-10.X_Graphite.tgz)
2. Downloaded Pat H's login_auth.zip (http://www.failover.ca/login_auth.zip)
(needed because the newer nutsmail skins is missing this plugin)
3. Unzipped login_auth.zip, which gives you the login_auth folder & files
4. Used 7-zip to open my 1.4.11_NM-10.X_Graphite.tgz archive, browsed to the nutsmail plugins folder and simply drag/dropped the login_auth folder to it
(this adds it to the archive .tgz file)
5. Copied the entire contents of Pat H's shell script (http://www.webhostingtalk.com/showpost.php?p=4443978&postcount=1) at the start of this thread and pasted it into a text file that I renamed to nutsmail.sh
6. Uploaded the 1.4.11_NM-10.X_Graphite.tgz and newly created nutsmail.sh to the server using CuteFTP Pro connected via SHH2. I placed it in /home , but I don't think it matters as long as you know the path.
7. Connected to my server vis SSH using the PuTTy client
8. After logging in, entered:
cp /usr/local/cpanel/base/webmaillogin.cgi /usr/local/cpanel/base/webmaillogin.cgi.bak
(this creates a backup of your webmaillogin.cgi file)
9. Next, I entered:
sh /home/nutsmail.sh
(this calls the .sh file. Modify the /home/ path if you put it somewhere else)
10. When prompted to enter the location of the nutsmail file, I entered:
/home/1.4.11_NM-10.X_Graphite.tgz and hit enter
(modify the name of the .tgz to whatever skin version you have. If you're smarter than me, you'll rename it to something easier to remember before uploading)
11. It will run through unpacking & installing the Nutsmail skin. When finished, a confirmation message appears.
That was it. Afterwards, I logged into cPanel and accessed SquirrelMail to ensure it was working.
I imagine it depends on your particular server setup, but I didn't receive any errors or experience any issues following the steps above. I have a CentOS 4.3 system running a standard installation of WHM/cPanel 11 that was setup for me by Platinum Server Management.
When I go to cPanel's webmail area, I still see the regular squirrelMail webmail icon - but it opens to the Nutsmail theme when I click on it, which is all I wanted. The nutsmail skin looks a million times better than the default SquirrelMail.
Patrick 11-19-2007, 07:34 PM When I go to cPanel's webmail area, I still see the regular squirrelMail webmail icon - but it opens to the Nutsmail theme when I click on it, which is all I wanted. The nutsmail skin looks a million times better than the default SquirrelMail.
Thank you for your kind words, earlier in this thread. :)
I've been pretty busy lately, but I hope to have the shell script updated as soon as possible to make it more user friendly. For the most part everything works, but it has to run 100% correctly the first time or it could cause problems which is something the update will address.
Just one thing, if you want to prevent cPanel from overwriting NutsMail with the original SquirrelMail run the following:
chattr -R +i /usr/local/cpanel/base/3rdparty/squirrelmail/
That will prevent any changes to the squirrelmail (NutsMail) directory during nightly cPanel updates, and in the event that you need to reverse that command just run the following:
chattr -R -i /usr/local/cpanel/base/3rdparty/squirrelmail/
MBHWizardz 12-21-2007, 05:12 PM I am an total Newbie when it comes to cPanel and this HOWTO really helped to make short work of what appeared at first glance to be a monumental project. Hats off to Pat H.
You wouldn't happen to have a similiar tutorial available for Roundcube?
linux-tech 12-25-2007, 02:26 PM There is a pretty thorough one on roundcube here (http://www.hostgeekz.com/guides/cPanel/64/Install_RoundCube_on_cPanel.htm)
netbasiks 02-09-2008, 01:01 AM I have found the solution to my login problem.
I copied /usr/local/cpanel/base/3rdparty/squirrelmail.cpanel/plugins/login_auth/
to
/usr/local/cpanel/base/3rdparty/squirrelmail/plugins/
And it is now login without asking twice for identification.
Hi Bonsai,
I just installed NutsMail serverwide on a Cpanel 11 server and it's working fine. However, I get prompted to login twice. I do not see the path you have mentioned above. /usr/local/cpanel/base/3rdparty/squirrelmail.cpanel/plugins/login_auth/
My OS is CentOS 4.5. Any Suggestions to prevent this annoying multiple logins? Thanks in advance!
Robby
netbasiks 02-09-2008, 01:30 AM Hi BonsaiRack,
OK. I have copied the files by using the command
cp -r /usr/local/cpanel/base/3rdparty/squirrelmail.old/plugins/login_auth/* /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/
But I still get prompted to login twice.
My OS is CentOS 4.5. Any Suggestions to prevent this annoying multiple logins? Thanks in advance!
Robby
Patrick 02-09-2008, 01:34 AM My OS is CentOS 4.5. Any Suggestions to prevent this annoying multiple logins? Thanks in advance!
Robby
Download:
http://www.failover.ca/login_auth.zip
Extract login_auth.zip to:
/usr/local/cpanel/base/3rdparty/squirrelmail/plugins
If that doesn't work, run the following and post the output here:
ls -la /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/login_auth
Frank Broughton 02-09-2008, 03:44 PM The plugin that is included with the Nutsmail package is called login_auto and not login_auth is this the cause of these problems with dual login. If so can one just rename login_auto to login_auth?
Frank Broughton 02-09-2008, 03:59 PM Pat,
Just installed NM via your script - worked perfectly. Thank you.
Previously I had NM installed in its own directory and had it server wide with an apache alias of /mail but when I set my VPS for the open_base security tweak it obviously broke my install. I was looking to replace the stock cPanel install of SM and ran across your thread here. Thank you for your hard work on providing this and also supporting it - that is above the call of duty.
My install works fine with the existing login_auth that was in the sm plugin directory. Did not need to rename the Nutsmail plugin login_auto to login_auth.
netbasiks 02-20-2008, 10:09 PM Download:
http://www.failover.ca/login_auth.zip
Extract login_auth.zip to:
/usr/local/cpanel/base/3rdparty/squirrelmail/plugins
If that doesn't work, run the following and post the output here:
ls -la /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/login_auth
total 56
drwxr-xr-x 2 cpanel cpanel 4096 Mar 27 2006 .
drwxr-xr-x 36 cpanel cpanel 4096 May 11 2007 ..
-rw-r--r-- 1 cpanel cpanel 15131 Mar 27 2006 COPYING
-rw-r--r-- 1 cpanel cpanel 8908 Mar 27 2006 functions.php
-rw-r--r-- 1 cpanel cpanel 470 Mar 27 2006 index.php
-rw-r--r-- 1 cpanel cpanel 686 Mar 27 2006 INSTALL
-rw-r--r-- 1 cpanel cpanel 2119 Mar 27 2006 README
-rw-r--r-- 1 cpanel cpanel 1101 Mar 27 2006 setup.php
-rw-r--r-- 1 cpanel cpanel 31 Mar 27 2006 version
Patrick 02-21-2008, 01:09 AM If the login_auth script is present, then there's no reason it should be forcing you to login twice. I have a few suggestions, but first I need the output from the following command:
ls -la /usr/local/cpanel/base/3rdparty/
(I still haven't had time to update the original script to make it full proof, but it has not been forgotten and it will be updated ... eventually!)
netbasiks 02-21-2008, 07:36 PM If the login_auth script is present, then there's no reason it should be forcing you to login twice. I have a few suggestions, but first I need the output from the following command:
ls -la /usr/local/cpanel/base/3rdparty/
(I still haven't had time to update the original script to make it full proof, but it has not been forgotten and it will be updated ... eventually!)
total 264
drwxr-xr-x 8 root root 4096 Feb 19 19:47 .
drwxr-xr-x 20 root root 4096 Feb 20 13:26 ..
drwxr-xr-x 18 cpanel cpanel 4096 Nov 20 14:27 bluehive
-rw-r--r-- 1 root root 107494 Feb 8 21:22 .cpanelsync
-rw-r--r-- 1 root root 116805 Feb 20 13:27 .cpanelsync.md5s
drwxr-xr-x 10 cpanel cpanel 4096 Feb 20 13:27 phpMyAdmin
lrwxrwxrwx 1 500 500 11 Jan 18 16:35 phpMyAdminRR -> phpMyAdmin/
drwxr-xr-x 11 cpanel cpanel 4096 Jan 18 16:35 phpPgAdmin
lrwxrwxrwx 1 root root 8 Feb 19 19:39 squirrelmail -> bluehive
drwxr-xr-x 17 cpanel cpanel 4096 Feb 19 19:42 squirrelmail.old
drwxr-xr-x 3 root root 4096 Jan 18 16:35 WysiwygPro
drwxr-xr-x 2 root root 4096 Jan 18 16:35 WysiwygPro-docs
Patrick 02-22-2008, 05:51 PM I have a feeling your symlink (SquirrelMail -> BlueHive) didn't allow my script to work correctly, so I would try the following:
cd /usr/local/cpanel/base/3rdparty/
rm squirrelmail
mv bluehive squirrelmail.nutsmail
mv squirrelmail.old squirrelmail
cd squirrelmail/plugins
wget http://www.failover.ca/login_auth.zip
unzip login_auth.zip
Run my shell script again (first page of this thread) and make sure you give the exact location of your BlueHive.tgz archive and let it run. Assuming no errors were present, BlueHive (NutsMail) should be installed without forcing you to login twice.
ramystyle 02-28-2008, 02:26 PM I installed using the .sh script. I can login and can see the skin. I can receive emails but i cannot send! :confused:
I get:
Message not sent. Server replied:
Authentication required
530 Relaying not allowed (please enable smtp authentication on your email client)
Please any help would be greatly appreciated!!!
Patrick 02-29-2008, 03:31 PM 530 Relaying not allowed (please enable smtp authentication on your email client)
Have you made any changes to the NutsMail config.php file?
Open the following file:
/usr/local/cpanel/base/3rdparty/squirrelmail/config/config.php
Double check that the following are set correctly:
$domain = $_SERVER['SERVER_NAME'];
$useSendmail = false;
$smtpServerAddress = 'localhost';
netbasiks 02-29-2008, 04:26 PM Hi Pat,
Thanks for the reply. I will try this over the weekend. I am getting the following error frequently:
ERROR Preference file, ../data/user@domain.com.pref.tmp, could not be opened. Contact your system administrator to resolve this issue.
If I were to reinstall NutsMail using your script, would it take care of this error as well? Thanks!
Robby
I have a feeling your symlink (SquirrelMail -> BlueHive) didn't allow my script to work correctly, so I would try the following:
Run my shell script again (first page of this thread) and make sure you give the exact location of your BlueHive.tgz archive and let it run. Assuming no errors were present, BlueHive (NutsMail) should be installed without forcing you to login twice.
netbasiks 03-01-2008, 01:05 AM I have a feeling your symlink (SquirrelMail -> BlueHive) didn't allow my script to work correctly, so I would try the following:
Run my shell script again (first page of this thread) and make sure you give the exact location of your BlueHive.tgz archive and let it run. Assuming no errors were present, BlueHive (NutsMail) should be installed without forcing you to login twice.
Hi Pat,
When I try to run your commands, I get the following error:
[root@host 3rdparty]# rm squirrelmail
rm: remove symbolic link `squirrelmail'? y
rm: cannot remove `squirrelmail': Permission denied
I am logged in as root, and so should have the right to delete this folder. Please help. Thanks!
Patrick 03-01-2008, 03:35 PM rm: cannot remove `squirrelmail': Permission denied
I am logged in as root, and so should have the right to delete this folder.
Run the following first:
chattr -R -i /usr/local/cpanel/base/3rdparty/squirrelmail/
Then run the following commands:
cd /usr/local/cpanel/base/3rdparty/
rm squirrelmail
mv bluehive squirrelmail.nutsmail
mv squirrelmail.old squirrelmail
cd squirrelmail/plugins
wget http://www.failover.ca/login_auth.zip
unzip login_auth.zip
Then run the original shell script (first page) and make sure you specify the exact path to your BlueHive.tgz archive. Assuming no errors are present during the installation, that should hopefully fix both the duplicate login and the preference error you have been experiencing.
netbasiks 03-02-2008, 02:19 AM Hi Pat,
Thanks a bunch for this awesome script, and your very helpful and prompt responses to my questions. :agree:
I successfully uninstalled and reinstalled nutsmail, and the installation went through without any errors.
So, I assume that my clients will not get any of the "preference" errors anymore. Also, I no longer need to login twice! :)
Thanks again!
tandem 03-19-2008, 11:10 PM First off, thanks for all your hard work.
Known Issues:1) cPanel cannot parse XML files, so the WYSIWG editor is broken by default. I'm writing a shell script to fix this, however it'll only work for IE... A workaround for FireFox is still being looked into?
Do you have the fixes for the WYSIWG editor by any chance?
utropicmedia-karl 03-19-2008, 11:23 PM First off, thanks for all your hard work.
Do you have the fixes for the WYSIWG editor by any chance?
This was fixed last year - I asked the cPanel people to add xml files to WHM's apache config.
utropicmedia-karl 03-20-2008, 01:19 AM Does anyone have an elegant way yet to prevent cpanel updates from overwriting the squirelmail directory?
Patrick 03-20-2008, 01:34 AM Does anyone have an elegant way yet to prevent cpanel updates from overwriting the squirelmail directory?
Besides chattr'n the whole directory? Nope. It's not an "elegant" way of clicking a yes or no box to disable updates to SquirrelMail, but it does work.
cPanel have taken notice of NutsMail, and even suggested it in a recent post regarding alternatives to the default webmail clients... now if only they would acquire it, clean up the code and add the ability to change the theme before logging in. :)
amclint 06-13-2008, 08:05 AM I used your script, and some of the advice in the 8 pages of comments to get this working in 5 minutes. Thank you very much, A+ for your script here.
roccol 05-03-2010, 06:26 PM Does this script work with 11.25 and latest nutsmail skins like web 2.0?
citycm 06-06-2010, 03:11 PM I too would be interested to know if this will work with the current version of cPanel and the new nutsmail skins.
|