Postfix is one of the finest, most reliable mail servers available. Although it is limited to only email, once it's set up, it will serve you and your small business well. The one downside to Postfix is that it does not have a built-in web-based component. Fortunately, there is a handy system called SquirrelMail to stand sentinel as your SquirrelMail web interface.
SquirrelMail doesn't have a ton of bells and whistles such as a calendar, or tasks, or notes, but for someone who needs to enable employees to access their Postfix email server from the web, it's an ideal solution. Let's get SquirrelMail up and running on a Ubuntu server.
- A working Mail Transfer Engine (Postfix). (If you don't already have Postfix installed, follow the steps in my post DIY IT: Email server on a shoestring budget.)
- A working (IMAP) Mail Delivery Agent (Dovecot). (If you have a working Postfix server, you most likely already have Dovecot working.)
- A working Apache installation with PHP
- Open a terminal window.
- Issue the command sudo apt-get install squirrelmail.
- Enter the sudo password.
- Accept any dependencies necessary.
- Let the installation complete.
Configuring SquirrelMailSquirrelMail comes with an easy-to-use, command line configuration tool. To use the tool, open a terminal window and issue the command sudo squirrelmail-configure. When this tool opens (Figure A), you should set the Organizational Preferences, which allow you to set the organization's name, logo, and link. The most important menu option to focus on is Server Settings, where the following must be set (at a minimum):
- A. Update IMAP Settings: localhost:143 (other)
- B. Update SMTP Settings: localhost:25
These should work just fine as is; the only thing you might have to change is if you've configured Postfix or Dovecot to work on a non-standard port.Figure A
SquirrelMail configuration tool
Next, go to General Settings (option 4 in the main menu) and then go to 11 (Server Side Sorting) and set that to True. If your IMAP server supports the SORT function, this will make for much more efficient sorting of email.
Once you have gone through all of the settings, be sure to select S (Save Data) from the main menu.
Now it's time to configure Apache so it knows where to locate the SquirrelMail installation. Follow these steps:Step 1: A sample configuration for SquirrelMail is included in the installation. Open a terminal window and issue this command:
sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmailStep 2: With that configuration in place, it has to be linked to the /etc/apache2/sites-enabled directory with this command:
sudo ln -s /etc/apache2/sites-available/squirrelmail /etc/apache2/sites-enabled/squirrelmailStep 3: The Apache configuration needs to be reloaded with this command:
sudo /etc/init.d/apache2 force-reload
Test it outIn order to see if you have a working SquirrelMail installation, you need to point your browser to http://ADDRESS_OF_SERVER/squirrelmail. If you see the SquirrelMail login window (Figure B), congratulations -- you now have a working web-mail interface for your Postfix mail server! Figure B
Any user with an account on that machine should be able to log in.
You can add plugins to extend the functionality of SquirrelMail. There is even a fully functional iCal compliant Calendar plugin that is easy to install.
- Download the plugin you want to use.
- Unpack the plugin in the /usr/share/squirrelmail/plugins/ directory.
- Check for a Readme or Install file within the unpacked plugin (each plugin has a different set of instructions).
- Open the squirrelmail-configure tool again and go to option 8 (plugins).
- Find the newly installed plugin and activate it.
Every plugin has a different set of installation instructions; oftentimes, those instructions are only dependencies. For the Shared Calendar plugin, the installation steps are as follows:
- Change to the /usr/share/squirrelmail/plugins/calendar/data directory.
- Issue the command cp config.php.sample config.php.
- Edit the config.php and set up the calendar administrators and make any adjustments necessary.
- Open the squirrelmail_config tool.
- Go to option 8.
- Enable the Shared Calendar plugin.
Many of the plugins will be just as easy to install, which means SquirrelMail is easily extendable.
I've been using SquirrelMail for years, and I have yet to find an easier web-based mail system to deploy and use. Your admins and your end users will thank you for installing SquirrelMail.
Jack Wallen is an award-winning writer for Techrepublic and Linux.com. As an avid promoter/user of the Linux OS, Jack tries to convert as many users to open source as possible. His current favorite flavor of Linux is Bodhi Linux (a melding of Ubuntu and Enlightenment). When Jack isn't writing about Linux he is hard at work on his other writing career -- writing about zombies, various killers, super heroes, and just about everything else he can manipulate between the folds of reality. You can find Jack's books on Amazon, Barnes & Noble, and Smashwords. Outnumbered in his house one male to two females and three humans to six felines, Jack maintains his sanity by riding his mountain bike and working on his next books. For more news about Jack Wallen, visit his website Get Jack'd.