iWestDev PlanetiWestDev Title
Left Corner  Home    About    Contact    Sponsor  Right Corner
Programming
  Acquire GBA  
  ezNetwork Engine  
  IM Compatible  
  Laffy Taffy GBA  
  Newsletter  
  Numbers Game  
  Scantron  
  SEO Tips  
  Speed up Postgres  
  T1 work arounds  
  Install squirrelmail  

Other
  Towing Scam  

   

How to install squirrelmail

      Some of you might be asking "What is squirrelmail?". Well, it an open source solution to webmail. It's all web based. No more installation of clients... Easier to manage for an Administrator. Plus, there are tons of plugins for you to select from if there is a feature missing in the default package.

      To start out we need a base linux system. Ubuntu seems to have been more stable then Debian in the past couple years. For the most part the "apt-get install" command in Ubuntu makes life really easy when installing additional packages. No more hunting and searching for .rpm packages.

      You will need Exim on the backend to handle processing the email. Use "apt-get install exim4-base" to intall exim. Run "dpkg-reconfigure exim4-config" to configure exim properly. Make sure to set the box as an "Internet Site" and not "Local Only".

      Now we are ready to install Squirrel Mail. As root on your linux box type in "apt-get install squirrelmail". It will go through and install all the files needed for Squirrel Mail. Another package you're going to need, if it isn't already installed is apache. Lucky enough all you need to do is type in "apt-get install apache2". Mental note: When installing Debian just make sure the webserver is selected to be installed.

      Now that you have Squirrel Mail and Apache installed you now need to prepare the webserver to be able to find the Squirrel Mail files to be displayed. To start out, you need to create a config file in /etc/apache2/sites-available/. Obviously, you should name it relevant to the website you're setting up, but for example purposes we used webmail.genericname.com. There is a default file located here that you can mimic. Since I am hosting multiple websites on the server I decided to setup virtual hosting. Here's what my configuration file generally looks like:

<VirtualHost *>
   ServerAdmin support@genericname.com
   ServerName webmail.genericname.com
   DocumentRoot /var/www/webmail.genericname.com
   ErrorLog /var/log/apache2/error.webmail.genericname.com
   CustomLog /var/log/apache2/access.webmail.genericname.com.log combined
   ServerSignature On
</VirtualHost>

      There is one other change in the apache2.conf file you need to add to make the virutal hosting work. You need to add a "NameVirtualHost *" entry. For some reason the server had problems if I placed it at the very end. I think this was related to the "inclusion of virtual host" entry. So I put it second to last and it worked. It should look something similiar to this:

NameVirtualHost *

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/[^.#]*

      A softlink needs to be added to help set things up. You need to change to the working directory /var/www by entering on the command line "cd /var/www". To create to softlink enter "ln -s /usr/share/squirrelmail webmail.genericname.com". Sure you could have just entered /usr/share/squirrelmail in your apache configuration file, but it seems to help me manage multiple websites in one central location this way.

      Now is time to set the website active. Another soft link will serve the purpose well. Enter "cd /etc/apache2/sites-enabled". This takes us to the directory we want to make the softlink. Now enter "ln -s /etc/apache2/sites-available/webmail.genericname.com webmail.genericname.com". Now for the last part we need to restart the webserver. Finally enter "/etc/init.d/apache2 restart". Take note if you already have tons of clients hitting your webserver you can use the "apache2 reload" command to prevent error 404 pages from being displayed for the couple seconds a restart would take.

      One thing I almost forgot about is that you need to setup for Maildir. The easiest way is to go to /etc/skel/ and type "maildirmake Maildir". This will setup maildir for the skeleton account. This way when you create new users they will already have Maildir setup for them.

      You might be asking "How do I create an email account". Well, there are a number of different ways. The default way is to use the standard linux user. You might be familiar with the syntax "adduser (desired username)". To change the password just use "passwd (desired username)". Like I mentioned there are other ways to setup accounts. If you go into /var/www/webmail.genericname.com/config and run ./conf.pl it takes you into a perl front end for configuring squirrelmail. Through this interface you will be able to do things like add plugins and setup a global address book.

      Overall, SquirrelMail is an excellent program for the price you pay... free. There are a couple quirky things about SquirrelMail like working through all the options and address can be confusing for your non-tech-savy user. Importing of address books was another option that non-tech-savy users had a hard time with. Little by little they seem to be making it better, but it's from the perspective of tech-savy people. I suspect this will probably get worked out in the future. Anyhow, I do recommend it to anyone looking for a simple answer to handle email... especially web-based.

Rececent Addition - 2/26/2008
     If you found this tutorial helpful, you might check out my recent blog on How to speedup squirrelmail. I found huge success using the suggestions.

   
Copyright© 2004 - 2008 West Anderson