Evaluating Atmail as a possible Squirrelmail replacement

I’ve been using Squirrelmail as the webmail interface for my home mail server for a few years now but recently I thought I’d give some of the alternatives out there a try to see whether a switch was in order, so this post is a look at the Atmail Open webmail client.

Atmail provide commercial email solutions but also make an open source version of their webmail client available under the Apache license.  It’s written in PHP and uses MySQL as a backend, so there were no additional software requirements for my Ubuntu 8.04 server. I’d read a write-up on Linux.com a while back and decided to give it a try.


The installation instructions on the web site are fairly basic, as are the instructions contained within the tarball itself.  I was slightly alarmed to see some pages recommending use of the MySQL root account to set up the system (e.g. on the Ubuntu forums in a post that reads like an ad and copies almost verbatim from a page on the Atmail site).  It all looked fairly straitforward, so I decided to fit the install into my existing system as follows.

First I unpacked the tarball in /usr/share to make /usr/share/atmailopen.  I then chown‘d this directory to www-data.

Next, I created a new database in MySQL and a user to access it.  I granted the user all privileges on the new database.  I called both the database and the user “atmail”.

The next step was to add a stanza to my apache configuration file under /etc/apache/sites-available.  I maintain a single site definiton and Alias in new sections from their homes in the filesystem as required. It’s all served over HTTPS for privacy and security.  I just added a stanza with simple auth and an AllowOverrides All statement. Everything else just inherited my default settings.

The final step was to slightly modify /etc/php5/apache2/php.ini with magic_quotes_gpc = Off. I had already increased the upload_max_filesize, post_max_size and memory_limit values for use with Squirrelmail – the first two were also mentioned in the Atmail documentation.

After restarting Apache, I visited the alias I’d set up for Atmail and followed the instructions. It was pretty straitforward: plug in the MySQL database and user details I’d prepared, select my local SMTP server and that was pretty much it. I was presented with a log-on page and after a struggling for a bit before figuring out that the page wouldn’t log me in without something after the @, even though my server just expects a username, I got into my inbox.

First Impressions

In no particular order, here’s a mixture of the things that have struck me about Atmail. I emphasize that these are just impressions, I haven’t spent much time troubleshooting or tweaking yet. I may update this list if my views change or I figure out how to solve any issues.

  • The UI looks quite nice, certainly more modern than Squirrelmail. It’s quite sluggish at times, particularly when accessed remotely.
  • My server backend is Courier IMAP. I have a number of nested folder trees already set-up. Atmail displays all the folders in a long column down the left of the browser window, the nested folders are labelled as “Parent.Child”, which is accurate enough but Squirrelmail hides this and allows you to expand and collapse a tree instead. This is particularly annoying when trying to drag messages to folders the are below the bottom of the window.
  • Atmail has added it’s own “Spam” folder” alongside my existing “Junk” folder. My Junk folder always falls off the bottom of the browser window due to the point mentioned above, but the Atmail Spam folder is sticky and always appears above the alphabetized folders. I’d rather use the Junk folder, as that is what my other mail applications use. To workaround I have replaced the .Spam folder in my ~/Maildir with a symlink to the .Junk folder.
  • Atmail also doesn’t appear to show unread mail counts for folders other than the Inbox – a cursory inspection of the configuration settings doesn’t show anything obvious to toggle this. Again this is something Squirrelmail does offer – I use Procmail on the server to filter incoming mail, so there are often new messages in various places throughout the tree.
  • I can’t find a setting to force mail to be viewed as plain text; there is one to turn off image loading in HTML mail so that’s something.
  • I can’t find any settings related to viewing folders in threads.
  • It’s not clear how committed Atmail are to the open source client. There don’t appear to have been any updates for a while, and there isn’t a large community of users. Squirrelmail seems far more established in these areas.


Atmail is OK, but I’m not overwhelmed. I’m not sure there’s a compelling reason to switch – I’m used to Squirrelmail and quite like it, it has an active development and support community and Atmail doesn’t appear to offer anything over and above it functionally, in fact when you consider Squirrelmail’s plugin ecosystem it probably comes in second. I will leave it installed and continue to use both side by side for a while and we’ll see which option ends up being my preferred one. Once I’ve made a final choice, I’ll update this post.

Technical Notes

This website is constructed with the help of Apache, Blosxom (with several plugins), a bit of javascript and Web Standards. It is very much a work in progress, but then point me to a weblog that isn’t. Here are some notes on the techniques used here.

Apache tricks

I use a couple of simple .htaccess tricks to help create more human-friendly URLs. Most of these hacks use mod_rewrite, and none are particularly esoteric. The comments in the following extract from the site-wide .htaccess should explain what’s going on:

# This little trick allows me to rename the blosxom
# script from the cumbersome script.cgi format to
# something simpler (in this case, 'sam'):

  SetHandler cgi-script

# Rewrite rules:
RewriteEngine On

# As I prefer to use just 'sgp.me.uk' as the base
# domain, this rule redirects requests for
# 'www.sgp.me.uk'.  This both allows the use of the
# 'www.' prefix while hopefully encouraging people
# not to use it by visibly redirecting rather than
# simply rewriting.
RewriteCond %{HTTP_HOST} ^www\.sgp\.me\.uk$ [NC]
RewriteRule ^(.*)$ http://sgp.me.uk/$1 [R=301,L]

# Pages devoted to baby photos have been integrated
# into my blog. This rule preserves the old
# hierarchy and provides me with a really simple
# URL to point family to for these photos:
RewriteRule ^uma(.*)$ /sam/uma$1

# I liked the idea of losing the required
# 'index.$flavour' suffixes for rss feeds:
RewriteRule ^sam(.*)/rss$ /sam$1/index.rss
RewriteRule ^sam(.*)/rdf$ /sam$1/index.rdf

Blosxom configuration

The site uses Blosxom 2.0. The script has been slightly modified to remove the code used to escape HTML when outputting RSS (see this post for more information on this and a patch). I also use the following plugins, some of which I wrote myself:


The website is designed to be accessible in all of the major browsers (having said that, it does render best in Firefox because of -moz-border-radius). It uses vaguely semantic HTML for structure and CSS for layout. The HTML template is written to validate against the XHTML 1.0 Strict Doctype, and the xhtmlmime plugin means that non-well-formed entries quickly get picked up. The RSS feeds are all validated against the Feed Validator from time to time.

To do

  • application/xhtml+xmldone!
  • Sort out some better page titlesdone!
  • Comments/Writebacks
  • Tags (think del.icio.us). Probably implement this using a hacked version of the meta plugin
  • Atom feed, once the spec is finaliseddone!
  • More stuff as I think of it
  • Oh yeah, actually post some real content