Getting started with the Citadel groupware server

Convenient Castle


The Citadel project offers an easy, stable, and versatile groupware alternative.

By Jon Watson

Dan Furubro, www.ventil8.net

Citadel [1] is an easy and versatile groupware alternative with tight integration and plenty of powerful features. While your fellow admins are still wrestling with Kolab2 and Horde, you might find that your Citadel installation is already configured and running securely. Citadel delivers an Exchange-killer groupware server, a web and telnettable BBS, and an online PIM suite using the standard GroupDAV protocol. You won't need your Linux administrator's handbook, and you won't need a lot of time. Citadel's 45 minute Easy Install involves only a handful of key presses and some very rudimentary knowledge of your system.

I initially stumbled across Citadel after  giving up on getting Kolab2 to work. It was a happy accident, because I've found Citadel more powerful than Kolab2 and remarkably easy to configure.

The main Citadel website http://www.citadel.org has all the information and files you'll need to get Citadel up and running. You'll find the highly active Citadel support community at the oldest running Citadel BBS on the planet, UNCENSORED! BBS [2].

Figure 1: Citadel comes with a convenient Easy Install feature.

The Citadel Story

In 1987, Citadel almost started life as a UNIX port of the existing Citadel-CP/M and Citadel-86 BBS platforms. However, in the words of Art Cancro, the creator of the modern day Citadel, "it didn't take long to figure out that a rewrite would be easier, so I started writing a Citadel implementation for Unix (which, for a while, bore the name UNIXrooms)." The project was driven by a need for a BBS dedicated to free speech. The UNCENSORED! BBS, the first BBS using this new implementation of Citadel, threw open its doors in early 1988.

Around the mid 1990s, the rise of the Internet threatened the existence of UNCENSORED!, as it did the entire dial-up BBS community. In response, Art hooked UNCENSORED! up to the Internet and started working on a web interface called WebCit. The project grew, and while Citadel retains its text and web interface today, it has also taken on the mantle of groupware, with fully functional IMAP and POP email, calendar, tasks, contact lists, and more.

Why Citadel?

Citadel is extremely easy to install and configure, especially when you consider its remarkable range of features. You can support email, calendaring, bulletin boards, mailing lists, instant messaging, and online discussion forums from a single Citadel installation.

Citadel's unique architecture is part of the reason for its success. A Citadel configuration is organized around containers called Rooms. According to the Citadel website, "...a room may be used as an email folder, a discussion forum, a realtime chat, a mailing list, a calendar, an address book, an RSS sink..." or some combination of these elements. A room may serve as something similar to a single Internet forum with a conversation on a single topic. Any user of the node can participate in the conversation. Citadel rooms can be organized into floors. A floor is a collection of rooms.

A telling feature of Citadel's heritage is that rooms can be shared between nodes. For those old enough to remember Fidonet and other echonets, the concept of Citadel's networked rooms will be familiar. Unlike the typical echonets of yesteryear, however, any node can start a new networked room by simply creating a local room and then offering it to other Citadel nodes. You don't need to go through a Fidonet coordinator or submit to a voting process, The room is available to any node that wants to participate.

Another very useful attribute of a room is that each room on a Citadel node has its own email address. A room named Dogs on my server, for example, bears the email address room_dogs@jonzdev.com. Emails sent to this address will appear in the Dogs room whether it is networked or not. All your floors and rooms can show up in your Kontact IMAP folder list.

The tight integration of Citadel's toolset provides some interesting benefits for busy users. For instance, I am always on the road, and the only gadget that is always at my side is my cellular phone. The phone is not really up to heavy data use, but it can send email. I like to send myself tasks as they come up, and email is a great way for me to do so. Most of the online todo services, however, don't have an email-to-task feature, or if they do, it's part of the premium service level. With Citadel, setting up such a system is trivial.

First, I create a floor and make it private so that only I can see it. I then created two rooms on that floor: todo_home and todo_work. Each room gets its own email address. Now a simple flip of my wrist sends an email to room_todo_home@jonzdev.com, and Citadel plunks a message to me into that room. I can then access that list either through WebCit or right in my IMAP folders within Kontact.

You'll be able to perform many other useful tricks with Citadel once you get the system up and running. This article describes how to install and configure a Citadel server. Once your system is up, you'll want to explore the many features of Citadel to find your own tricks for benefiting from this very versatile tool.

Installing Citadel

Citadel's GNU GPL'd source code can be compiled from scratch. If you're like me, however, you're looking for an easier way. Citadel comes with an Easy Install method, which you can use for either a new installation or an upgrade. You'll need root ssh/telnet access to your Internet-connected server in order to make use of the Easy Install method.

The following steps worked for me. However, I highly recommend taking a trip by the Citadel Easy Install site http://easyinstall.citadel.org prior to installing Citadel on your own system.

I installed Citadel on a Unixshell VPS http://www.unixshell.com running Debian 3.1 and the 2.6.16.13-xenU kernel (SMP). As of this writing, the current version of Citadel that the Easy Install will provide is Citadel 6.82. To install on Debian, you'll need the build-essential package, as well as curl and libssl-dev (only required if you want to enable SSL on your Citadel installation).

If you're not running a Debian system, you'll have to install whatever packages your distribution requires to provide a working build environment.

I initiated the installation with:

curl http://easyinstall.citadel.org/install | sh

If you don't have curl for some reason, you can use wget instead:

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

As the docs say, the Easy Install is easy, but not fast. There are times, such as when downloading and installing the Berkeley DB, that the install seems to hang. Never fear; it will continue in due course.

After the requisite database and libraries are downloaded and installed, the Citadel installation will commence. The Citadel developers paid a great deal of attention to creating an installer that asks the right questions and provides the right defaults. Citadel, for example, won't assume that you want to use its built-in POP, IMAP, and SMTP servers. Rather, it asks if you would like to do so. The same applies to the web server port that WebCit is to run on. If you're already running Apache on port 80, you can simply tell WebCit to listen on an alternate port, so as to leave your current setup alone.

Make a note of the administrator username you've picked, answer a few simple questions about which services to start at boot, and you are now the proud owner of a new Citadel installation located at yourserver.com, or yourserver.com:XXXX if you picked an alternate port.

Configuring Citadel

Citadel has almost an infinite number of possible configurations, however, I do not have an infinite number of pages for this article. I will therefore focus on configuring Citadel with the following assumptions:

Regardless of how you want to use Citadel, you're likely going to want to do something about the logging. The oddest thing about the Citadel installation is that is logs to the local4 facility by default. Since most systems don't have a local4 set up, that means Citadel logs directly to your terminal. There's nothing quite so annoying as logging text being written to your terminal while you're trying to complete other tasks. Therefore, step one is to tell that logging to go elsewhere. I'm sure Citadel provides a number of ways to do this. One easy solution is to edit your /etc/syslog.conf file and point the local4 facility to a log file.

Citadel can be configured through either the WebCit or the text interface, but I prefer WebCit (Figure 2). In order to use Citadel's mail servers, you're going to have to tell Citadel some basic information. Log into your WebCit installation with the administrator username you chose during installation, and click the Administration link on the bottom left.

Figure 2: Web Cit is an easy and intuitive tool for configuring Citadel.

Click the Domain names and Internet mail configuration link. In order to receive Internet email, you have to tell Citadel the domains you'd like to receive email for. Plunk your primary domain in the Local host aliases field and click the Add button. Do this for as many domains as you would like Citadel to accept mail for.

None of the other fields on this screen are required, but if you'd like to make use of Smart hosts, SpamAssassin, or any of the other options, put the required information in the applicable box.

Another area of the configuration that may be of interest to you is the Edit site-wide configuration | Network tab. If you're intending to run POP, IMAP, or SMTP, the defaults in this page are probably fine. However, this is where you can shut off services, change ports, and set a variety of other network options.

If you're intending on authenticating to LDAP, you'll have to visit the Edit site-wide configuration | Directory tab and fill in your LDAP host and credentials.

There is a variety of other settings in the tabs on this page, but we're just dealing with the bare minimum to get your groupware up and running. Once you've set this up, a thorough investigation of all the options in the site configuration is time well spent.

Configuring Kontact

Although WebCit provides a very functional web interface for all of Citadel's features, sometimes it's nice to have the power of a local PIM client. Citadel can speak Webcal, GroupDAV, and IMAP, and there is some noise about a third-party MS Outlook connector in the works. Setting up Kontact to work with Citadel using the GroupDAV protocol is very easy.

I'm using Kontact 1.2, which contains Kmail 1.9.1. I mention that because when we get to the Calendar and To Do List applications, there's a small glitch that you'll have to know to get it working right. For starters, however, let's set up our IMAP email account.

Kontact is basically a shell application that holds all of the other standalone KDE PIM applications in it. To get into the Kmail settings, click the Mail icon and select Tools | Configure Kmail.

Figure 3: Configuring Kontact IMAP email for Citadel.

Figure 4: Configuring Kontact SMTP.

Receiving Email

Click the Accounts icon and then the Add button. I'm going to use an IMAP account, but you can select POP if you'd like. Click the OK button and fill in the Account Name (just for display; it doesn't matter what you call it), your Citadel login, your Citadel password, and your Citadel host address. If you've put your mail server on a non-standard port, make sure you enter that port in the Port field. If you're using IMAP like me, you can click the circular refresh icon next to the Namespaces label, and Kmail will ask the server for values for your Personal, Other Users, and Shared namespaces. As you can see in my screen cap, my Personal namespace is INBOX/ and Shared is Main Floor/. If you've set up SSL or TLS on your server, you can click the Security tab and then the button labeled What the Server Supports to have Kmail figure out the right settings for you. Check any other options you'd like, and click the OK button.

Sending Email

Now that we can get email, we need a server to send it out. To use Citadel's built in SMTP server, click the Sending tab and then the Add button. Select SMTP and click OK. Much like the IMAP configuration, enter a Name (for display only) and your Citadel host address, and ensure the right port is in the Port field.

Your Citadel server does require authentication in order to defeat spammer's attempts to use it as an open relay. Click the Server requires authentication checkbox and enter your Citadel username and password in the appropriate fields. If you've installed SSL or other security, you can click the Security tab and the Check What the Server Supports button to quickly set those options. Configure any other options you'd like, and click OK.

You should now be able to send and receive email from your new Citadel server. Click the Check Mail icon on your Kontact toolbar and see what happens. If you receive connection or authentication errors, double-check your settings and try again.

Configuring Calendar and Tasks

Email is nice, but having universal access to your PIM data is invaluable. To add Citadel as a calendar resource, click Kontact's Calendar icon and click the Add button below the Calendar listing field. I like the GroupDAV protocol, so in the resulting window, I select the GroupDAV Server (e.g., OpenGroupware) option and click OK.

Enter a display name in the Name field, and your Citadel credentials in the GroupDAV Server section. Your user and password credentials are the same Citadel credentials you used for email, but the URL is a little different. Your GroupDAV URL is your HTTP Citadel URL (including non-standard port if you're not running on port 80) with /groupdav appended to it. In my case, that makes my standard Citadel installation GroupDAV address: http://www.jonzdev.com/groupdav. (Note that jonzdev.com is my development domain and may point anywhere on the planet at any given time. This URL is pretty much guaranteed not to work by the time this article is printed.) If my Citadel is on port 2000, for example, my GroupDAV URL is: http://www.jonzdev.com:2000/groupdav.

To ensure you have your settings correct, click the Update Folder List button. Despite the fact that you've entered your user and password into the GroupDAV server section already, you will be prompted for your credentials once again. Enter them, and you should see your Folder Selection window become populated with Calendar and Tasks items with checkboxes beside them.

There are some bugs kicking around the process, and in many cases, Kontact will display more than one Calendar and Tasks resource. Checking the checkboxes beside a chosen Calendar and Task resource is supposed to enable that resource. However, checking any number of checkboxes has no effect. The checkbox will not remain checked and the resource will not be added to the resource list. Instead of checking the checkbox beside a Calendar and Tasks resource, right-click it and select enable. You have to select at least one Calendar and Tasks resource, but you can enable them all with no apparent ill effects.

Figure 5: Setting up Calendars and Tasks.

Configuring Contacts

The process for configuring contacts is very similar to configuring Calendar and Tasks. To get started, click Kontact's Contacts icon. At the bottom left is a pane labeled Address Books. Click the Add button below it. With a little sense of déjù vu, select the GroupDav Server (e.g., Open Groupware) item and click OK. Enter the same user, password, and URL that you entered for the Calendar and Tasks, and then click the Update Folder List button. Again, follow in the footsteps of the Calendar and Tasks process and enable at least one Contact. If you're going to share an address book, you should also enable at least one Global Address Book item.

WebCit and Kontact

As you add and edit calendar appointments, task items, and contact records, you can keep an eye on the changes from WebCit. To do so, log into your WebCit account and watch your items appear in the web interface. Citadel gives you full access to all your PIM data and email from the web.

Note that changes made in either Kontact or WebCit may take a few minutes to sync. This is largely dependent on when you check your mail, as everything is synced when a mail check is done. I set my Kontact to check my mail at 5 minute intervals just to make sure I'm saving everything frequently.

Conclusion

Citadel has a long history as a versatile Open Source groupware server. The Citadel system offers email, instant messaging, calendaring, BBS services, and other features in a tightly integrated package. Citadel's architecture makes it easy to devise and implement custom solutions.

INFO
[1] Citadel Project: http://www.citadel.org/
[2] UNCENSORED! BBS: Telnet or web to uncensored.citadel.org