I ventured into the waters of setting up my own SquirrelMail web-based email application on Bluehost – and haven’t seen any sharks yet! Bluehost provides webmail via SquirrelMail, Horde or RoundCube. They are great options but I found that SquirrelMail didn’t have many (if any) plug-ins installed–even the spell checker! Some browsers, esp. Firefox, do have spell check built in but that only cover 46% of users at the time of this post–and not my client. So I set about reading about SquirrelMail and some great posts, including How to Install SquirrelMail. I thoroughly followed the guide on the SquirrelMail website.
Step by Step
The first step was to go to cPanel and open the File Manager under Files and select the Home Directory radio button. From there you have a nice folder view of your website. You can see the public_html folder where SquirrelMail will go and other folders next to that. I then clicked on the add a new folder button and created a folder named data on the same level with public_html. I created another folder in the new data folder and called that attach. This was a quick way to create the folders outside of public_html.
I then downloaded and unzipped the latest SquirrelMail file. I didn’t start thinking about the plug-ins yet because I wanted to be sure it was going to work without them. The only file you need to change is the config_default.php file and start by resaving it as config.php. I decided to edit this by hand via Dreamweaver because I didn’t want to bother getting shell access or downloading Perl. It is super easy to edit and you get the side benefit of learning a bit of PHP (I have no PHP experience)!
The key areas to edit in the config.php file are:
- Default Domain (line 118)
- Paths to Data and Attachment Directories (lines 499 and 517)
- Address of the IMAP Server and Port (lines 202 and 210)
- IMAP Encryption (set to true if using SSL on line 240)
- Address of the SMTP Server, SMTP Port and SMTP Encryption Settings (lines 146, 151 and 249)
Bluehost provides the email server paths through cPanel – Mail – Email Accounts. If you already have your email accounts set up navigate to the right and click the More button and then Configure Email Client and you will see all the server names and port numbers. (This may be in a different place with another host).
Move SquirrelMail to the Server
I used the ftp program FileZilla to move the customized SquirrelMail folder into public_html. I renamed the folder to email because it is shorter and will be visible in the browser address bar.
TEST – this is actually fun.
Test at http://example.org/squirrelmail/src/configtest.php (replace example with your domain name) after adding a few plugins–it will catch if you forget to add the plugin to the config file or forget to move the plugin to the plugin folder and change config file name.
Set up plugins by removing the comments and changing the number and name of the plugin (line 945). I did these a few at a time in case they caused problems.
I decided on the following plugins:
$plugins = ‘squirrelspell’;
$plugins = ‘abook_import_export’;
$plugins = ‘add_address’;
$plugins = ‘compatibility’;
$plugins = ‘login_auto’;
$plugins = ‘show_ssl_link’;
$plugins = ‘select_range’;
$plugins = ‘addgraphics’;
Add your Logo
It is really easy to add your own logo to replace the Squirrel on the login page. Put a web-ready logo in the images folder of SqurrelMail and edit line 41 of the config file with the file name. You can also specify the logo size on lines 47 and 53 (remember to uncomment these).
Bluehost has shared SSL and if you want your own you have to pay for it. The 3 webmail clients offered have SSL login pages – but there are also non-SSL login pages so you have to be sure to use the secure ones. For an email login page it seems necessary to have encryption on the password while you are logging in. I think this is an open door if not addressed. Now that I have completed installing my own SquirrelMail with all the plugins I want I am realizing that I need to use this crazy address to have a secure login: https://secure.bluehost.com/~username/squirrelmail/src/login.php. I created a work around via a subdomain and redirect. Read on.
Webmail Login Page
I wanted to have a nice and tidy email login page for my client. To do this, I created a subdomain: webmail.example.com and then, this is key, I redirected the page to the secure.bluehost…address above. Now I can email my client the easy login page and they can get to their secure login without remembering or saving the long address. If you don’t want to bother with the long address SSL login, you can buy your own private SSL and dedicated IP address – this is also a necessity for larger companies to keep a consistent web address.