How to setup a mail server with Citadel on the Pogoplug

In a never-ending series of attempts to see what the Pogoplug is capable of serving, I have found yet another function it can handle, e-mail and groupware. Ever since I experimented with Horde a few months ago I had wanted to see if it was possible to serve it or something similar on the Pogoplug. Unfortunately, the Pogoplug suffers with Horde, due to the amount of RAM and PHP processing it does. This may improve with some tweaks and the eventual release of PHP 5.4.0 in the Arch Linux repositories.

Thus, I began looking at alternatives (preferably ones that aren’t PHP-based, which there aren’t many). But I did happen to stumble upon Citadel, which apparently has been around for eons. Citadel is more than just a groupware and e-mail solution. It is the SMTP, IMAP, and POP server in itself. And even better is that Citadel is deployed as a black box solution, meaning it’s not intricately tied into your system and everything the program needs is in one folder. But that’s not all, ready for the best news? Citadel doesn’t use an interpreted language like PHP or Python, the entire server and web front-end are written in straight up C. Basically, that means screaming performance when compared to a PHP web application (especially on a limited system like the Pogoplug).

So the first we need to do is make sure we have all the standard build tools.

pacman -S base-devel

After that we need to setup an init.d link to fake out the Citadel installer. The Citadel installer is configured for System V style Linux distros, hence Arch Linux uses BSD style init scripts. If the Citadel installer fails to see the init.d link then it will fail to start (which doesn’t really matter, we can start it manually) but moreover if you’ve configured it to use Self-contained authentication then it will fail to create the administrator account that you specified in the setup. So just a few quick commands here to get things setup.

mkdir /etc/init.d
ln -s /usr/local/citadel/citadel.init /etc/init.d/citadel

Now that we’ve got that in place all we have to do is run the installer. Note that if you’re Pogoplug has 128MB RAM you’ll probably need to unmount the /tmp dir because it will run of room during the compilation of the program.

umount /tmp

Then just change into the /opt directory and run the installer.

cd /opt
wget -q -O - http://easyinstall.citadel.org/install | sh

Give it a while to build the program (I think it takes probably around 45 minutes to 1 hour) and afterwards it will launch into the setup program. Answer all the questions appropriately and after all is said and done it should have successfully started both citserver and webcit in your process list. Unless you’ve changed the default port that webcit listens on you should be able to point your browser to port 2000 and the web interface should present itself.