# Courier Mail Server

Copyright 1998-2003 Double Precision, Inc. This software is distributed under the terms of the GNU General Public License. See COPYING for additional information.

The Courier mail transfer agent (MTA) is an integrated mail/groupware server based on open commodity protocols, such as ESMTP, IMAP, POP3, LDAP, SSL, and HTTP. Courier provides ESMTP, IMAP, POP3, webmail, and mailing list services within a single, consistent, framework. Individual components can be enabled or disabled at will. Courier now implements basic web-based calendaring and scheduling services integrated in the webmail module. Advanced groupware calendaring services will follow soon.

Courier's source code should compile on most POSIX-based operating systems based on Linux, and BSD-derived kernels. Courier should also compile on Solaris and AIX, with some help from Sun's or IBM's freeware add-on tools for their respective operating systems.

Courier evolved out of several related projects, that merged together (more on that later). Courier implements SMTP extensions for mailing list management and spam filtering. Courier can function as an intermediate mail relay, relaying mail between an internal LAN and the Internet, or perform final delivery to mailboxes. Courier uses maildirs as its native mail storage format, but it can also deliver mail to legacy mailbox files as well. Courier's configuration is set by plain text files and Perl scripts. Most of Courier's configuration can now be adjusted from a web browser, using Courier's web-based administration module.

Courier can provide mail services for regular operating system accounts. Courier can also provide mail services for virtual mail accounts, managed by an LDAP, MySQL, or PostgreSQL-based authentication database.

Certain portions of Courier - the mail filtering engine, the webmail server and IMAP server - are also available are separate, smaller, packages that can be used with other mail servers.

> The following pages describe the procedure for downloading, compiling, installing, and configuring the Courier server. This is a somewhat involved process that may overwhelm people that do not have prior experience with installing large software packages. Many Linux-based distributions and BSD-family systems have separately-maintained, preconfigured, ready-to-install packages that can be loaded with much less investment of time. Installing a pre-built package would probably be the best approach in this case.

> Should you choose to install a platform-specific prebuilt package, you should carefully read any custom documentation files that are included in the package. Most platform-specific packages provide custom, non-default configuration settings that are optimized for that platform unique needs and requirements. Feedback about platform-specific precompiled packages should be copied to the development group that maintains the package, in additional to the platform-neutral `courier-users` mailing list. They will appreciate the feedback, and take it into consideration when preparing the next revision of the platform-specific package.

## General documentation

The source code for Courier includes documentation in HTML and manual page format. The HTML version of Courier's documentation can be browsed below. The documentation on the web may vary slightly from the documentation that comes with the current tarball snapshot or build. Usually the HTML documentation in the CVS Repository gets updated first, then the version that's published on the web, and the changes will then be rolled into the next tarball snapshot.

> Introduction

> Status/Download

> Installation

> FAQ

> Links

> History/Background

## Manual pages

Please note that the online version of these manual pages reflect the installation directories used for development and testing. When you install Courier, the actual installation directory you use will be reflected in your manual pages.

> `cancelmsg(1)`

> `couriermlm(1)`

> `couriertls(1)`

> `dot-forward(1)`

> `lockmail(1)`

> `maildirkw(1)`

> `maildirmake(1)`

> `mailbot(1)`

> `maildrop(1)`

> `makedat(1)`

> `makemime(1)`

> `mimegpg(1)`

> `preline(1)`

> `reformail(1)`

> `reformime(1)`

> `sendmail(1)`

> `testmxlookup(1)`

> `maildropex(5)`

> `maildropgdbm(5)`

> `maildropfilter(5)`

> `dot-courier(7)`

> `localmailfilter(7)`

> `maildirquota(7)`

> `authlib(8)`

> `courier(8)`

> `courierfax(8)`

> `courierfilter(8)`

> `courierldapaliasd(8)`

> `courierperlfilter(8)`

> `courierpop3d, courierpop3login(8)`

> `couriertcpd(8)`

> `courieruucp(8), makeuucpneighbors(8)`

> `dupfilter(8)`

> `esmtpd(8), esmtpd-msa(8)`

> `imapd(8)`

> `mailq(8)`

> `makeacceptmailfor(8)`

> `makealiases(8)`

> `makehosteddomains(8)`

> `makepercentrelay(8)`

> `makesmtpaccess(8), makesmtpaccess-msa(8)`

> `makeuserdb(8), pw2userdb(8), vchkpw2userdb(8)`

> `mkesmtpdcert(8)`

> `mkimapdcert(8)`

> `mkpop3dcert(8)`

> `pop3d(8)`

> `submit(8)`

> `userdb(8)`

> `userdbpw(8)`

## Internal documentation (white papers)

The following stuff could be out of date, incomplete, or plainly wrong. An early version of these files were used for the initial design of the Courier mail server. As Courier was being developed, there were many slight changes from the original design. Hopefully, this documentation has been updated to reflect those changes... In some cases, stuff that's used to be here eventually migrated to the manual pages. This is a royal mess, you have been warned.

Directory Layout

Mail Queue

Transport Modules

Internal Structures

`courierd` Daemon Process

The `local` module

The `esmtp` module

The following documents describe Courier-specific ESMTP extensions.

The XEXDATA ESMTP extension is a useful extension to the format of the response to the DATA command, which allows for recipient-specified mail filters to be used.

The XVERP ESMTP extension allows for optimized distribution of mailing list messages with automatic bounce handling.

The XSECURITY ESMTP extension extends the existing SSL/TLS ESMTP extension to allow the implementation of a secure mail delivery infrastructure on top of an untrusted, public, network.