"Fossies" - the Fresh Open Source Software Archive 
Member "courier-1.2.2/courier/doc/index.html" (26 Jun 2020, 25142 Bytes) of package /linux/misc/courier-1.2.2.tar.bz2:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 <?xml version="1.0"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5 <html xmlns="http://www.w3.org/1999/xhtml">
6 <head>
7 <meta name="MSSmartTagsPreventParsing" content="TRUE" />
8 <!-- Copyright 2000-2020 Double Precision, Inc. See COPYING for -->
9 <!-- distribution information. -->
10
11 <title>The Courier Mail Server</title>
12 <link rel="icon" href="icon.gif" type="image/gif" />
13 </head>
14
15 <body>
16 <p class="toc"><a href="#features">Features</a><br />
17 <a href="install.html">Install</a></p>
18
19 <p>The <em>Courier</em> mail transfer agent (MTA) is an
20 integrated mail/groupware server based on open commodity
21 protocols, such as ESMTP, IMAP, POP3, LDAP, SSL, and HTTP.
22 <em>Courier</em> provides ESMTP, IMAP, POP3, webmail, and mailing
23 list services within a single, consistent, framework. Individual
24 components can be enabled or disabled at will. The
25 <em>Courier</em> mail server now implements basic web-based
26 calendaring and scheduling services integrated in the webmail
27 module. Advanced groupware calendaring services will follow
28 soon.</p>
29
30 <p>The <em>Courier</em> mail server's source code should compile
31 on most POSIX-based operating systems based on Linux, and
32 BSD-derived kernels. The <em>Courier</em> mail server should also
33 compile on Solaris and AIX, with some help from Sun's or IBM's
34 freeware add-on tools for their respective operating systems.</p>
35
36 <p>The <em>Courier</em> mail server evolved out of several
37 related projects, that merged together (more on that later). The
38 <em>Courier</em> mail server implements SMTP extensions for
39 mailing list management and spam filtering. The <em>Courier</em>
40 mail server can function as an intermediate mail relay, relaying
41 mail between an internal LAN and the Internet, or perform final
42 delivery to mailboxes. The <em>Courier</em> mail server uses
43 <a target="_blank" href=
44 "http://www.courier-mta.org/mbox-vs-maildir/" shape=
45 "rect">maildirs</a> as its native mail storage format, but it can
46 also deliver mail to legacy mailbox files as well. The
47 <em>Courier</em> mail server's configuration is set by plain text
48 files and Perl scripts. Most of The <em>Courier</em> mail
49 server's configuration can now be adjusted from a web browser,
50 using The <em>Courier</em> mail server's web-based administration
51 module.</p>
52
53 <p>The <em>Courier</em> mail server can provide mail services for
54 regular operating system accounts. The <em>Courier</em> mail
55 server can also provide mail services for virtual mail accounts,
56 managed by an LDAP, MySQL, or PostgreSQL-based authentication
57 database.</p>
58
59 <p>Certain portions of the <em>Courier</em> mail server -
60 <a target="_top" href="http://www.courier-mta.org/maildrop/"
61 shape="rect">the mail filtering engine</a>, the <a href=
62 "http://www.courier-mta.org/sqwebmail/" target="_top" shape=
63 "rect">webmail server</a> and the <a target="_top" href=
64 "http://www.courier-mta.org/imap/" shape="rect">IMAP server</a> -
65 are also available as separate, smaller, packages that can be
66 used with other mail servers.</p>
67
68 <h2><a name="features" id="features"></a>Features</h2>
69
70 <ul>
71 <li>Can be configured to function as an intermediate mail
72 relay, or as a mail server that receives mail for multiple
73 domains and makes it accessible to mail clients, or anything in
74 between.</li>
75
76 <li>On servers with multiple IP addresses, optionally assign a
77 <a href="courier.html#multihomed">vanity configuration to
78 <em>Courier</em> for each IP address</a>, making each IP
79 address look like a separate, dedicated, mail server instance,
80 for both incoming and outgoing mail. An alternative limited
81 vanity configuration for outgoing mail only, based on the
82 sending mail client's authenticated login, is possible when
83 multiple IP addresses are not available.</li>
84
85 <li>Web-based administration and configuration tool.</li>
86
87 <li>Local mailboxes can be accessed via POP3. The
88 <em>Courier</em> mail server includes an integrated POP3
89 server.</li>
90
91 <li>Local mailboxes can be accessed via IMAP. The
92 <em>Courier</em> mail server includes an integrated IMAP
93 server.</li>
94
95 <li>A built-in IMAP/POP3 aggregator proxy. It is possible to
96 distribute all mailboxes between multiple servers. A separate
97 server (or a pool of servers) accepts connections from IMAP or
98 POP3 clients, then connects to the right server based on the
99 mailbox the connecting client is logging into.</li>
100
101 <li>Local mailboxes can be accessed via HTTP. The
102 <em>Courier</em> mail server includes an <a href=
103 "/sqwebmail/screenshots.html">integrated webmail
104 server</a>.</li>
105
106 <li>The webmail server includes a personal <a target="_blank"
107 href=
108 "http://www.courier-mta.org/sqwebmail/images/monthly.png">event
109 calendar</a>.</li>
110
111 <li>Uses an efficient <a target="_blank" href=
112 "http://www.courier-mta.org/mbox-vs-maildir/">maildir</a>
113 format as its native mail storage format. Some support is
114 provided for legacy mbox mailboxes.</li>
115
116 <li>Flexible "Sender Policy Framework" support; the ESMTP
117 <code>HELO</code>, <code>MAIL FROM</code>, and the
118 <code>From:</code> header can be validated using SPF.</li>
119
120 <li>DSN, PIPELINING, and 8BITMIME ESMTP extensions. The
121 <em>Courier</em> mail server automatically converts 8-bit
122 messages to 7-bit encoding, for relaying mail to external mail
123 gateways.</li>
124
125 <li>STARTTLS ESMTP extension (as well as
126 IMAP/POP3/ESMTP/Webmail over SSL) in both the client and the
127 server (requires OpenSSL). The ESMTP client can optionally
128 require that the remote server's X.509 certificate is signed by
129 a trusted root CA (a default set of root CAs is provided).</li>
130
131 <li>Experimental TLS/SSL enhancements which are designed to
132 implement a secure mail delivery channel between trusted
133 domains, over an untrusted network. This is implemented by
134 requiring mail to select domains use TLS/SSL connections which
135 require the remote server to present an X.509 certificate
136 signed by a private (not a public) certificate authority. This
137 is pretty much the highest level of security that can be
138 achieved with today's technologies. This doesn't even require
139 DNSsec. Even if the DNS cache is poisoned with MX records that
140 divert mail to a rogue relay, the attacker will not have an
141 X.509 certificate signed by a private CA (this assumes, of
142 course, that the security of the private CA hasn't been
143 breached). This work is mostly complete, but still needs a
144 little testing.</li>
145
146 <li>Message submission protocol (RFC 2476).</li>
147
148 <li>IPv6 support (experimental).</li>
149
150 <li>NOTE: the integrated servers work with maildir-based
151 mailboxes only. There are many existing POP3, IMAP, and webmail
152 servers that provide excellent support for mbox-based
153 mailboxes, so there's no reason to reinvent the wheel. Some
154 popular mbox servers are: <a target="_blank" href=
155 "http://www.eudora.com/qpopper/">Qpopper</a>, <a target=
156 "_blank" href="http://www.washington.edu/imap/">UW-IMAP</a>,
157 and <a target="_blank" href=
158 "http://neomail.sourceforge.net/">NeoMail</a>.</li>
159
160 <li>A faxmail gateway (experimental) that forwards E-mail
161 messages via fax (requires a compatible class 2 faxmodem). The
162 <em>Courier</em> mail server doesn't implement the actual
163 faxing all by itself, actually. The <em>Courier</em> mail
164 server uses additional software (which must be separately
165 installed), to take care of the low-level details. The popular
166 <a target="_blank" href=
167 "http://alpha.greenie.net/mgetty/">mgetty+sendfax</a> package
168 talks to the faxmodem and handles the actual faxing. Conversion
169 of E-mail messages to fax pages is done by <a target="_blank"
170 href="http://www.ghostscript.com/">ghostscript</a>, troff or
171 <a target="_blank" href=
172 "http://www.gnu.org/software/groff/groff.html">groff</a>, and
173 the <a target="_blank" href=
174 "http://netpbm.sourceforge.net/">NetPBM</a> library. The
175 <em>Courier</em> mail server glues all of these pieces together
176 in a seamless manner any time an E-mail message addressed to
177 <code><phonenumber@fax></code> is received. The main
178 textual body of the E-mail message is placed on a cover page,
179 and any attachments are converted to fax image format and
180 transmitted after the cover page. At this time, The
181 <em>Courier</em> mail server knows how to send plain text, PDF,
182 and Postscript attachments. GIF, JPEG, and PNG images can be
183 sent to (one image per page). The additional software packages
184 that were mentioned previously are usually already included in
185 most Linux and BSD installations. In most cases no additional
186 software really needs to be installed in order to get
187 faxmailing up and running.</li>
188
189 <li>The <em>Courier</em> mail server includes a mailing list
190 manager, with fully automatic bounce processing.</li>
191
192 <li>You don't need a full-blown mail server? <em>Courier</em>
193 mail server's <a target="_top" href=
194 "http://www.courier-mta.org/imap/">IMAP server</a>, <a target=
195 "_top" href="http://www.courier-mta.org/sqwebmail/">webmail
196 server</a>, and <a target="_top" href=
197 "http://www.courier-mta.org/maildrop/">mail filter</a> are
198 available as independent packages that can be used with other
199 mail servers (as long as the other mail servers store mail in
200 <a target="_blank" href=
201 "maildir.html">maildirs</a>).
202 These sub-packages are assembled from the same source code
203 tree. The only difference is the top level makefile. Note: the
204 independent builds are not always in sync with the main the
205 <em>Courier</em> mail server build at any given time. They
206 follow their own schedule, and may include a slightly older, or
207 even more recent, code base! Over time, however, everything
208 always syncs together since all builds are assembled from the
209 same source code repository.</li>
210
211 <li>SOCKSv5 support. The <em>Courier</em> mail server can punch
212 through a SOCKS firewall to send outgoing mail. Receiving mail
213 through a SOCKS firewall is not yet supported. To use SOCKS you
214 need to install the <em>Courier</em> mail server's Socks 5
215 proxy client library.</li>
216
217 <li>PAM, LDAP, PostgreSQL (beta), or MySQL authentication. LDAP
218 authentication requires <a target="_blank" href=
219 "http://www.openldap.org">OpenLDAP</a> to be installed.
220 LDAP-based mail routing is also supported.</li>
221
222 <li>Gateway mail to/from UUCP (if compatible UUCP software is
223 separately installed).</li>
224
225 <li>Authenticated SMTP.</li>
226
227 <li><code>XVERP</code> and <code>XEXDATA</code> ESMTP
228 extensions.</li>
229
230 <li>DNS-based blacklists. Ability to exempt whitelisted IP
231 addresses from the blacklists.</li>
232
233 <li>Integrated mail filtering. An API is provided for
234 installing arbitrary external mail filters, and the system
235 administrator can selectively enable for any mail source
236 (ESMTP, UUCP, locally submitted mail) for filtering. Two
237 example mail filters are included - one written in C that uses
238 threads, and a Perl-based filter. The system administrator can
239 also enable the ability for individual mail recipients to
240 specify their own mail filtering rules, using a scripting
241 language (implemented by <code>maildrop</code>, see below).
242 Mail filtering is implemented as an integral part of the mail
243 server. Unwanted mail is rejected, and is not accepted by the
244 <em>Courier</em> mail server for delivery (the external mail
245 relay receives the error, and it becomes the external relay's
246 problem as to what to do with unwanted junk mail).</li>
247
248 <li>Partial ability to import <code>sendmail</code>'s aliases
249 file, but not all aspects of <code>sendmail</code>'s aliasing
250 is supported - like delivering to programs, for example. Still,
251 most simple <code>aliases</code> files should be usable.</li>
252
253 <li>Optional ability to import most of <code>Qmail</code>'s
254 <code>.qmail</code> files (<em>Courier</em> mail server uses an
255 almost 100% compatible local mail delivery instruction
256 format).</li>
257
258 <li>Most major components of the <em>Courier</em> mail server
259 can be installed in non-default directories, allowing extreme
260 customization for your particular environment.</li>
261
262 <li>You can set a maximum number of messages to deliver
263 simultaneously to the same host. This, in fact, is strongly
264 encouraged so that a single nonfunctioning domain does not take
265 up all available delivery slots. Rate limiting is implemented
266 in the main scheduler, and applies to any transport mechanism,
267 not just ESMTP.</li>
268
269 <li>Mailing list administrators can specify a backup relay and
270 have mail that's not immediately deliverable offloaded to a
271 backup server (this feature needs testing/feedback).</li>
272 </ul>
273
274 <p>However, it is also important to note what the
275 <em>Courier</em> mail server does not have or will not
276 support:</p>
277
278 <ul>
279 <li><code>.forward</code> files are partially supported. The
280 <em>Courier</em> mail server can import most basic
281 <code>/etc/aliases</code> files from <a target="_blank" href=
282 "http://www.sendmail.org">sendmail</a>, but sendmail's
283 <code>.forward</code> and <code>/etc/aliases</code> files are
284 simply not 100% compatible with the <em>Courier</em> mail
285 server's security model. Most <code>.forward</code> and
286 <code>/etc/aliases</code> files should be acceptable, but some
287 may not.</li>
288
289 <li><code>ETRN</code> is not, and will never be implemented.
290 It's a hack, and is functionally incompatible with the
291 <em>Courier</em> mail server's internal message dispatcher. If
292 a mail node does not have constant network connectivity, there
293 are better ways of arranging for mail transport than ETRN. The
294 transient mail node should download mail via IMAP, or maybe
295 even UUCP.<br /></li>
296
297 <li>Workarounds for known defects in other mail software. The
298 <em>Courier</em> mail server will not accept mail with raw
299 8-bit characters in the headers, because they are illegal.
300 There are well-defined protocols that must be used to encode
301 8-bit text in mail headers. Non-compliant messages may result
302 in the <em>Courier</em> mail server itself issuing corrupted
303 delivery status notifications, or mishandling the message in
304 several other ways. Because of that corrupted mail will simply
305 not be accepted. Neither will the <em>Courier</em> mail server
306 deliver mail to domains with improperly-defined MX records,
307 even though other mail servers ignore the bad data.
308 Additionally, certain popular IMAP mail clients are known to
309 not work with the <em>Courier</em> mail server's IMAP server,
310 due to an improper IMAP implementation by the mail client.</li>
311
312 <li>Scripting language for rewriting mail headers. Mail
313 rewriting rules are hardcoded, and are expected to be
314 sufficient in most cases. If you have an unusual situation that
315 requires some oddball header rewriting, you'll have to
316 implement it yourself.</li>
317
318 <li>Support for mbox mailboxes in the POP3, IMAP, and webmail
319 components. They support maildirs only. There are plenty of
320 existing servers out there that read mbox mailboxes.</li>
321 </ul>
322
323 <h2>Requirements</h2>
324
325 <ul>
326 <li>A C++ compiler, <code>egcs</code> is recommended. Most of
327 the <em>Courier</em> mail server are written in C, but several
328 major sections are written in C++.</li>
329
330 <li>GNU make. Other <code>make</code>s may work, but that's not
331 guaranteed.</li>
332
333 <li>Either the GDBM or Berkeley DB library must be available.
334 Only certain versions of Berkeley DB API are supported, because
335 the Berkeley DB API often changes (tested with 2.4.14 and
336 1.8.5). GDBM is the recommended library.</li>
337
338 <li>Perl 5.</li>
339
340 <li>The file system must support FIFOs. At least the file
341 system that stores the mail queue must be able to support
342 FIFOs. The <em>Courier</em> mail server will not work with
343 AFS.</li>
344
345 <li>Filesystem domain sockets must be available.</li>
346
347 <li>Some optional components have additional dependencies -
348 notably the additional software required for faxmail support
349 (see above).</li>
350 </ul>
351
352 <h2>Additional information</h2>Here is a somewhat more detailed
353 overview of the <em>Courier</em> mail server's less prominent
354 features:
355
356 <h3>Upgrade path</h3>The <em>Courier</em> mail server can be
357 installed on systems that were previously running sendmail or
358 Qmail. Please note that the <em>Courier</em> mail server will be
359 able to support most major features of both servers, however the
360 <em>Courier</em> mail server is not, and will never be a
361 100%-compatible replacement for either sendmail or Qmail. The
362 <em>Courier</em> mail server does not implement several legacy
363 features of either MTA, and there are no plans to implement them
364 in the future. The key differences are:
365
366 <ul>
367 <li>sendmail</li>
368 </ul>
369
370 <p>A local mail delivery agent, such as <code>procmail</code>,
371 should be used for maximum compatibility with sendmail.</p>
372
373 <p>The <em>Courier</em> mail server expects system mailboxes to
374 be in the users' home directories. If your system mailboxes are
375 all stored separately, in <code>/var/spool/mail</code> or
376 somewhere else, you'll need to use a local delivery agent such as
377 <code>procmail</code>.</p>
378
379 <p>The <em>Courier</em> mail server uses a filesystem lock on
380 mailbox files, The <em>Courier</em> mail server does not support
381 old-fashioned dot-locking. If you need dot-locking, use
382 <code>procmail</code> or <code>maildrop</code> (included).</p>
383
384 <ul>
385 <li>Qmail</li>
386 </ul>
387
388 <p>A configuration switch allows the <em>Courier</em> mail server
389 to read <code>$HOME/.qmail</code> files, however the
390 <em>Courier</em> mail server's implementation is not 100%
391 identical to Qmail's. The <em>Courier</em> mail server's
392 <code>aliases</code> file is also used to implement Qmail-style
393 virtual domains. A simple Perl script can be used to convert
394 Qmail's <code>control/virtualdomains</code> into
395 <code>aliases</code> entries.</p>
396
397 <p>The <em>Courier</em> mail server supports Maildirs
398 natively.</p>
399
400 <p>The <em>Courier</em> mail server can use the
401 <code>maildrop</code> mail filter as a local mail delivery agent.
402 <code>maildrop</code> is optional, but, if used, The
403 <em>Courier</em> mail server will take advantage of certain
404 <code>maildrop</code>-specific features which optimize local mail
405 delivery.</p>
406
407 <h2>Mail filters</h2>The <em>Courier</em> mail server has hooks
408 for optional, site-defined, mail filters. You'll have to write
409 them yourself, though. The administrator-defined mail filters can
410 block the message from being accepted by the <em>Courier</em>
411 mail server (if messages comes in via SMTP, the SMTP server will
412 reject it). The <em>Courier</em> mail server can also be
413 configured to pause for a short period of time before attempting
414 to deliver a message. If the mail filter detects a slew of
415 duplicate messages coming in, the mail filter can block all
416 future copies, and manually bounce the handful of copies from the
417 queue. The system administrator can selectively enable filtering
418 for any individual mail source (ESMTP, locally submitted mail,
419 UUCP). The system administrator can also optionally enable
420 recipient-specified mail filters. With recipient-specified mail
421 filtering enabled, any local mail recipient can install an
422 arbitrary mail filter to selectively accept or reject mail based
423 on any criteria.
424
425 <p>Currently the mail filtering API is not very well documented,
426 but it's there.</p>
427
428 <h2>ESMTP extensions</h2>The <em>Courier</em> mail server
429 implements <code>AUTH</code>, <code>PIPELINING</code>,
430 <code><a href="courierdsn.html">DSN</a></code>,
431 <code>SIZE</code>, and <code>8BITMIME</code> extensions to SMTP.
432 The <em>Courier</em> mail server also includes a reference
433 implementation of the experimental <code>XVERP</code> and
434 <code>XEXDATA</code> extensions.
435
436 <p>The <em>Courier</em> mail server is a closed mail relay by
437 default. The <em>Courier</em> mail server cannot be accidentally
438 configured as a completely open relay. A deliberate feat of
439 stupidity is required for that to happen.</p>
440
441 <h2>ESMTP BOFH</h2>The <em>Courier</em> mail server does not
442 deliver mail to domains with broken MX records. The
443 <em>Courier</em> mail server also refuses to accept any mail with
444 a return address in a domain with broken MX records.
445
446 <p>The <em>Courier</em> mail server can automatically blacklist
447 domains whose mail servers reject delivery status
448 notifications.</p>
449
450 <h2>Header rewriting</h2>The <em>Courier</em> mail server will
451 rewrite headers and MIME-ify messages whenever appropriate.
452 Header rewriting logic is hardcoded in C, there is no header
453 rewriting language as in sendmail. An interpreted language
454 imposes a drastic speed penalty. The rewriting library is fairly
455 simple, and the the standard rewriting rules will do for most
456 situations.
457
458 <p>The <em>Courier</em> mail server rejects messages with
459 badly-formed or missing MIME headers. The <em>Courier</em> mail
460 server rejects messages containing 8-bit characters in the
461 headers, or messages that contain 8-bit content, but do not have
462 the required MIME headers. Accepting malformed messages of that
463 kind can result in the <em>Courier</em> mail server itself
464 sending mail that violates the relevant RFCs, therefore
465 <em>Courier</em> mail server will simply reject
466 improperly-formatted messages. There are well-defined RFC
467 standards that explicitly spell out how mail containing 8-bit
468 content or 8-bit headers should be encoded, and those standards
469 will have to be properly implemented by anyone that wishes their
470 mail to be accepted.</p>
471
472 <h2>Modularity</h2>Message scheduling, dispatching, and the
473 actual transport mechanism are completely modularized. Different
474 message transport mechanisms such as UUCP can be implemented in a
475 simple plug-in fashion, however some C coding will be required.
476
477 <h2>Message scheduling</h2>The <em>Courier</em> mail server
478 supports VERPs, multiple recipients per message, and
479 RFC1894-compliant delivery status notifications.
480
481 <h2>Load limiting</h2>You can set a maximum number of messages to
482 deliver simultaneously to the same host. This, in fact, is
483 strongly encouraged so that a single nonfunctioning domain does
484 not take up all available delivery slots. Rate limiting is
485 implemented in the main scheduler, and applies to any transport
486 mechanism, not just ESMTP.
487
488 <h2>Automatic restarts and garbage cleanup</h2>The
489 <em>Courier</em> mail server's scheduling engine restarts itself
490 automatically, on a regular basis. This helps with memory
491 fragmentation. The <em>Courier</em> mail server tries to restart
492 itself during periods of system inactivity.
493
494 <h2>Smart organization of the message queue and temporary
495 directories</h2>The <em>Courier</em> mail server automatically
496 creates subdirectories when necessary, and deletes them when
497 they're empty. When there's a sudden peak in the number of
498 messages added to the queue, directories used to store the
499 messages grow in size to accomodate the additional entries. On
500 many file systems, once those messages are deleted, the empty
501 slack space in the directory is not reclaimed, and actually slows
502 down subsequent directory operations. The <em>Courier</em> mail
503 server automatically removes empty directories, reclaiming the
504 slack space.
505
506 <h2>Smart installation layout</h2>
507
508 <p>The <em>Courier</em> mail server's configuration script will
509 install the <em>Courier</em> mail server into
510 <code>/usr/lib/courier</code> by default. Everything will go into
511 several subdirectories there: the actual binaries, configuration
512 files, the mail queue, manual pages, and auxiliary support files.
513 Optional configuration switches allow pretty much every major
514 subdirectory to be relocated anywhere else. For example, the Red
515 Hat RPM package for the <em>Courier</em> mail server relocates
516 the configuration files to <code>/etc/courier</code>, the manual
517 pages to <code>/usr/man</code>, and the mail queue to
518 <code>/var/spool/courier</code>.</p>
519
520 <h2>Mailing lists</h2>
521
522 <p>The <em>Courier</em> mail server can implement both sendmail
523 and qmail-style address aliases. De-duping of sendmail-style
524 aliases is automatic. The <em>Courier</em> mail server source
525 distribution also includes a complete mailing list manager.</p>
526 <hr />
527
528 <p class="copyright">Copyright 1998-2020 Double Precision, Inc.
529 This software is distributed under the terms of the GNU General
530 Public License. See COPYING for additional information.</p>
531 </body>
532 </html>