[BlueOnyx:01164] nutsmail rather than squirrelmail

Stuart Clark (Datacenta) stuart.clark at datacenta.net
Thu Apr 30 09:34:06 -05 2009


Hi 

Does anyone know how to incorporate the nutsmail theme and base package properly into the blueonyx gui etc?
I have got this working via host.domain.com/webmail and all appears ok and the package is working.
However within the gui you still get the squirrelmail login screen.

Below are the install instructions for nutsmail

3. login via ssh to your server.
4. execute the following commands:
cd /usr/share/
mkdir nutsmail
5. upload the package files you downloaded in step 2 to /usr/share/nutsmail/ (to do this you will need a
program capable of sftp (secure ftp) and youʼll need to login with the same details as you used when you
accessed your server via ssh)
1. On windows a free and easy-to-use client is bitvise tunnelier. you can download it from: http://
www.bitvise.com/download-area . Alternatively, you can use “PuTTY” which is free as well, but does
not come with a built-in sftp client, so youʼll need to use an ftp program with sftp support, filezilla
http://filezilla-project.org/download.php?type=client works well.
2. On OS X you can ssh from your terminal window, you can also use filezilla for sftp access.
3. On linux you should be able to use ssh from the terminal as well and again filezilla is available.
6. extract the files you uploaded in step 5 (i.e.)
cd nutsmail
tar ‐xvzf PACKAGENAME
Extract first the base package, and then the skin package. The order is important as the skin package has to
overwrite the configuration files of the base package
7. if you have used squirrelmail on your server previously (ie this is not a brand-new server) then you need to
know the location of itʼs config.php file, (i.e. /path/to/squirrelmail/config/config.php) download this file for
reference and skip steps 8-11.
8. if you have not used squirrelmail on this server yet then you can use a different directory as you wonʼt
have to worry about your clientsʼ preference files, addressbooks etc... in this case, you could execute the
following commands:
mkdir /usr/share/squirrelmail‐data
mkdir /usr/share/squirrelmail‐attach
9. copy the default_pref file to /usr/share/squirrelmail-data from /usr/share/nutsmail/data/ you can do it with
the following command:
cp /usr/share/nutsmail/data/default_pref /usr/share/squirrelmail‐data
10. find out what user/group apache is running under (this is usually “nobody/nobody” but varies on servers.
if you are unsure, a look at /etc/httpd/conf/httpd.conf should show you, you may have to look around as
different server-types have this file in different places, in some cases it may be named “apache.conf”) and
change the ownership of the directories created in step 9 to this user/group. i.e.:
chown ‐R nobody /usr/share/squirrelmail‐data
chown ‐R root /usr/share/squirrelmail‐attach (we set this to owned by root as the
webserver will only need “write” access, not “read” access)
chgrp ‐R nobody /usr/share/squirrelmail‐attach
11. change the permissions on these directories/files:
chmod go‐w /usr/share/squirrelmail‐data
chmod ‐R 730 /usr/share/squirrelmail‐attach
12. edit /usr/share/nutsmail/config/config_local.php You can do this directly on the server, or you can
download the file, edit it, save it as plaintext and then upload it back to the same location. Nutsmail differs
from Squirrelmail in configuration only in that we make all changes in config_local.php and
nutsmail_themes.php rather than editing config.php as we did previously. The conf.pl script does not work
properly with nutsmail packages so please refrain from using it. Manually editing the configuration file is
straightforward and weʼll provide explanations for the necessary changes below. You must save the file as
plain text - do not use a word processor's document format. When you're done with it, put it in the config/
directory contained in the directory you uploaded Nutsmail to. Keep in mind that the configuration file is
actually a PHP script and must contain valid PHP syntax. This means that you should only change values
that are (usually but not always) in quotes, making sure not to alter anything else. It is especially important
that you leave the semicolons at the end of each line. Always save a copy of the original file in case you
make a mistake and need to start over.
13. When editing the configuration file, you don't have to change ALL the settings, but there are several that
are mandatory (some of the settings, i.e. $use_imap_tls, $use_smtp_tls are not in the config_local.php file, in
the case that you are using them, youʼll need to add them and their value on a new line). Note that if you
have squirrelmail setup already you can get the values for some of these from the config.php file you located
in step 7:
✴ Default Domain: This is set in the $domain setting and is the part after the "@" sign in the mail
addresses on your mail server. Set this either to “localhost” or leave the setting as is.
✴ Paths to Data and Attachment Directories: These are set in the $data_dir and $attachment_dir
settings. If you have a previous setup then use the values you noted down in step 7, else the
following should be set:
$data_dir = '/usr/share/squirrelmail‐data/';
$attachment_dir = '/usr/share/squirrelmail‐attach/';
✴ Address of the IMAP Server: This is set in the $imapServerAddress variable. This may work:
$imapServerAddress = 'localhost';
✴ Address of the SMTP Server, SMTP Port and SMTP Encryption Settings: The following should
work as well:
$smtpServerAddress = 'localhost';
✴IMAP Server Settings: Check the document at: http://squirrelmail.org/docs/admin/admin-13.html to
see if your IMAP server type is listed there. If so, adjust the settings in your configuration file
according to the ones that match your server type.
14. The following settings are optional, but in most cases youʼll want to change/set them:
$org_name = ""; (Your organization/company’s name)
$org_logo = SM_PATH . 'skins/XP_BlueSky/logo.jpg'; (change if you want to use a custom
logo; for best results try to use an image with similar dimensions to the Nutsmail logos,
140px X 78px, though you can make it square ie 140px X 140px, try not to go over 140px in
width)
$org_logo_width = '140'; (width of your logo)
$org_logo_height = '78'; (height of your logo)
$org_title = ""; (Appears in the title bar of your setup, and the top‐right of most skins)
15. Weʼll now backup and then edit apacheʼs httpd.conf file (note that we will set an alias to /webmail this
means that any domain on your server will be able to access this setup via domain.com/webmail. if this is
already possible then youʼll need to either choose a different alias, i.e. domain.com/email or locate and
change the existing /webmail alias, if itʼs not set in the main httpd.conf file then it may be “included” from
another file; locating this is beyond the scope of this document) You need to know the location of this file as it
varies from server to server.
cd /etc/httpd/conf/
cp httpd.conf httpd.conf.nutsmail
download or edit httpd.conf and at the end of the file add this line:
Alias /webmail /usr/share/nutsmail
restart your apache server, this command should work but if it doesnʼt then contact your host, use the
command that works for you, or use your control panel interface and restart your webserver from there.
/etc/init.d/httpd restart
16. You should now test that you are able to login, (make sure you have an email address setup on your
server first, managing email accounts is outside the scope of this document, please see the cpanel
documentation on how to setup email accounts on your server if you do not already know how). Nutsmail at
this point will have replaced squirrelmail so when you go to domain.com/webmail/ and click on the
squirrelmail icon youʼll be redirected to your Nutsmail setup.

Now I realised that the above alias was not in the httpd.conf but located in the conf.d/squirrelmail.conf. I made the following changes In brackets in the conf file:


Alias /webmail /usr/share/nutsmail

<Directory /usr/share/ {nutsmail} />
php_admin_value safe_mode off
php_admin_value open_basedir /home/:/tmp/:/var/lib/php/session/:/usr/share/ {nutsmail} /:/etc/squirrelmail/:/var/spool/squirrelmail/:/var/lib/squirrelmail/prefs/
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/lib/squirrelmail/prefs/>
php_admin_value safe_mode off
php_admin_value open_basedir /home/:/tmp/:/var/lib/php/session/:/usr/share/ {nutsmail} /:/etc/squirrelmail/:/var/spool/squirrelmail/:/var/lib/squirrelmail/prefs/
Options FollowSymLinks
AllowOverride All
</Directory>

When using the gui I get the folder names from both nutsmail and squirrelmail. What else do I need to do to make this work correctly?

Regards,

Stuart

--
Stuart Clark
Systems Administrator
---------------------------------------------------------------
Datacenta Hosting Ltd                            
Gild House, 72 Norwich Avenue West, Bournemouth, Dorset, BH2 6AW.

Tel: 01202 755 377 - Fax: 01202 755 301
www.datacenta.net – A Kimcell Company
---------------------------------------------------------------
Datacenta Hosting Ltd is a company registered in Scotland with registration number: SC208801
Registered address: Crescent House, Carnegie Campus, Dunfermline, Fife, KY11 8GR
VAT Number: 785629182
---------------------------------------------------------------
Charitable donations to Julia’s House and Youth Cancer Trust were made in 2008 in lieu of sending Christmas cards.
Think before you print! Save paper - do you really need to print this email?








More information about the Blueonyx mailing list