hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Software and Control Panels : Hosting Software and Control Panels Tutorials : HOWTO: Integrating NutsMail into cPanel (Global Installation)
Reply

Hosting Software and Control Panels Tutorials Tutorials specifically for control panels and other hosting software.
Forum Jump

HOWTO: Integrating NutsMail into cPanel (Global Installation)

Reply Post New Thread In Hosting Software and Control Panels Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-03-2007, 07:19 PM
Patrick Patrick is offline
Stairway To Hosting
 
Join Date: Mar 2003
Location: Canada
Posts: 7,906
Arrow

HOWTO: Integrating NutsMail into cPanel (Global Installation)


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:

Quote:
#!/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.


Last edited by dollar; 03-20-2008 at 02:33 AM. Reason: Edited by request
Reply With Quote


Sponsored Links
  #2  
Old 04-04-2007, 01:14 AM
tumble tumble is online now
Premium Member
 
Join Date: Mar 2006
Location: Ventura CA
Posts: 268
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

Reply With Quote
  #3  
Old 04-04-2007, 02:00 PM
Patrick Patrick is offline
Stairway To Hosting
 
Join Date: Mar 2003
Location: Canada
Posts: 7,906
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.

Reply With Quote
Sponsored Links
  #4  
Old 04-04-2007, 02:16 PM
tumble tumble is online now
Premium Member
 
Join Date: Mar 2006
Location: Ventura CA
Posts: 268
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

Reply With Quote
  #5  
Old 04-05-2007, 01:33 PM
Patrick Patrick is offline
Stairway To Hosting
 
Join Date: Mar 2003
Location: Canada
Posts: 7,906
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.

Reply With Quote
  #6  
Old 04-05-2007, 02:09 PM
tumble tumble is online now
Premium Member
 
Join Date: Mar 2006
Location: Ventura CA
Posts: 268
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

Reply With Quote
  #7  
Old 05-30-2007, 08:59 AM
BonsaiRack BonsaiRack is offline
Web Hosting Guru
 
Join Date: Aug 2005
Posts: 314
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

Reply With Quote
  #8  
Old 05-31-2007, 09:52 AM
BonsaiRack BonsaiRack is offline
Web Hosting Guru
 
Join Date: Aug 2005
Posts: 314
My installation always finish like this :

Quote:
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!

Reply With Quote
  #9  
Old 05-31-2007, 12:19 PM
Patrick Patrick is offline
Stairway To Hosting
 
Join Date: Mar 2003
Location: Canada
Posts: 7,906
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?

Reply With Quote
  #10  
Old 05-31-2007, 12:42 PM
Vinayak_Sharma Vinayak_Sharma is offline
Always Learning...
 
Join Date: Aug 2002
Location: Bharat
Posts: 4,571
camay123 have you already installed RoundCube?

Check attributes of webmaillogin.cgi and other file and directories.

Reply With Quote
  #11  
Old 05-31-2007, 01:04 PM
BonsaiRack BonsaiRack is offline
Web Hosting Guru
 
Join Date: Aug 2005
Posts: 314
Quote:
Originally Posted by Pat H View Post
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.

Reply With Quote
  #12  
Old 05-31-2007, 01:06 PM
BonsaiRack BonsaiRack is offline
Web Hosting Guru
 
Join Date: Aug 2005
Posts: 314
Quote:
Originally Posted by vinsar View Post
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 ?

Reply With Quote
  #13  
Old 05-31-2007, 01:32 PM
Patrick Patrick is offline
Stairway To Hosting
 
Join Date: Mar 2003
Location: Canada
Posts: 7,906
Hrm, can you do a:

ls -la /usr/local/cpanel/base/3rdparty/

Reply With Quote
  #14  
Old 05-31-2007, 03:52 PM
BonsaiRack BonsaiRack is offline
Web Hosting Guru
 
Join Date: Aug 2005
Posts: 314
Quote:
Originally Posted by Pat H View Post
Hrm, can you do a:

ls -la /usr/local/cpanel/base/3rdparty/
Here it is :

Quote:
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 [~]#

Reply With Quote
  #15  
Old 06-01-2007, 11:17 AM
BonsaiRack BonsaiRack is offline
Web Hosting Guru
 
Join Date: Aug 2005
Posts: 314
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.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
cPanel & WHM Software 11.36 Reaches Stable Tier Status Web Hosting News 2013-04-09 11:44:33
VIDEO: Troy McCasland of Attracta on SEO Software for Hosting Providers Whir Tv 2012-11-12 12:59:02
Video: cPanel and Attracta Talk About Integrating SEO Tools into the Hosting Control Panel Whir Tv 2012-08-31 14:10:47
Attracta SEO Tools Integrated into cPanel Control Panel Web Hosting News 2012-03-16 12:09:53
Control Panel cPanel Launches New Apache Configuration Script Web Hosting News 2011-12-28 19:41:39


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?