Home Download FAQ / Knowledge Base Screenshots Documentation Support

Creating Modules

What is a Module

Basically a module is a part of the Citadel Server (citserver) that does something useful in the real world.

That's a bit vague so here is a better explanation.

Citadel Server is made up of a set of system routines which we can call the "core" with a suite of modules layered on top.

On its own, the core isn't really capable of doing much that a user would consider useful. The core doesn't understand SMTP, POP3, IMAP, CalDAV, LDAP or any other protocol. Nor does the core understand the concept of indexing, spam, auto completion, calendars or user biographies. All of this functionality is provided by modules.

On the other hand the core does contain a wealth of knowledge. It keeps the system stable and provides services to the modules. Any service that the core provides it knows all about, and knows how to do it best.

When writing a module never try to second guess the core. Never write a function to do something the core already does because you think you can do it better (you may be able to but there is probably a good reason why the core does it that way).

The core does know about:

  * Starting up the server.
  * Creating and controlling the worker threads.
  * Creating and controlling the maintenance threads.
  * Listening for connections.
  * Maintaining the message store data base.
  * Enforcing user permissions.
  * Enforcing the Citadel protocol.
  * Scheduling of time based operations.
  * Logging to the log file
  * And lots of other things.

You should consult the modules API section for full details of services and functions provided by the core.

There are no social media links here. Enjoy a friendly Citadel community instead. Or go outside.