Luc de Louw


Revision History
Revision 1.2.62004-03-30Revised by: ldl
Added minor additions and corrected to amavisd-new, corrected cronjob-time for freshclam
Revision 1.2.52004-03-28Revised by: ldl
Added Anti-Virus and SPAM methods (amavisd-new, spamassassin, clamav), updated cyrus-imapd section with update instructions, added instruction to restrict imapd admin access.
Revision 1.2.42003-11-30Revised by: ldl
Input from English proofreading, minor correction and enhancements from user-input, updated software mentioned in the HOWTO
Revision 1.2.32003-03-24Revised by: ldl
Some minor correction and enhancements from user-input, updated software mentioned in the HOWTO
Revision 1.2.22003-02-14Revised by: ldl
Lots of grammar and typos fixed. Some corrections to the pam_mysql Makefile
Revision 1.2.12003-02-12Revised by: ldl
Non-official test-release: Added lots of fixes and updates. Added OpenSSL and more pam related stuff.
Revision 1.2.02002-10-16Revised by: ldl
Added lot of user requests, updated the software mentioned in the HOWTO
Revision 1.1.72002-10-15Revised by: ldl
Added Michael Muenz' hints for SMTP AUTH, corrected ca-cert related mistake, improved SGML code (more metadata), updated the software mentioned in the document.
Revision 1.1.62002-06-14Revised by: ldl
Added sasl_mech_list: PLAIN to imapd.conf, added web-cyradm mailinglist, added more to web-cyradm
Revision 1.1.52002-06-11Revised by: ldl
Added new SQL query to initialize web-cyradm to have full data integrity in the MySQL Database, reported to be operational as expected.
Revision 1.1.42002-05-15Revised by: ldl
Added description what is needed in /etc/services Another fix for pam_mysql compile, updated software versions.
Revision 1.1.32002-05-08Revised by: ldl
Added more description for web-cyradm, fix for wrong path of the saslauthdb-socket, Fix for wrong place of com_err.h, protection of the TLS/SSL private key.
Revision 1.1.22002-04-29Revised by: ldl
Added description for Redhat users how to install the init scripts.
Revision 1.1.12002-04-29Revised by: ldl
Fixed bug in configuring cyrus-IMAP (disabled unused kerberos authentication)
Revision 1.1.02002-04-28Revised by: ldl
Initial support for building cyrus from source, dropped binary installation for Cyrus, because configuration has changed with Release 2.1.x
Revision 1.0.22002-04-25Revised by: ldl
Added basic description for sieve and correct sender handling, minor fixes to db related stuff, Added mysql-lookup for »mydestination« , fixed bug for building postfix with mysql support.
Revision 1.0.12002-04-07Revised by: ldl
Added an important fix for compiling pam_mysql
Revision 1.0.02002-04-07Revised by: ldl
Initial Release

This document guides you through the installation of the Postfix mail transportation agent (MTA), the Cyrus IMAP server. The goal is a fully functional high-performance mailsystem with user-administration with Web-cyradm, a webinterface. Data like virtualusers, aliases etc. are stored in a mysql database.

Table of Contents
Getting and installing the software
Configuring MySQL
Configuring PAM
Configuring Postfix
Configuring Cyrus IMAP
Configuring Web-cyradm
Testing the setup
Fighting against Viruses and SPAM
The software needed against viruses and SPAM
Further Information
Questions and Answers


The cyrus part is only valid for Cyrus-IMAP 2.1.x and Cyrus-SASL 2.1.x. If you plan to use Cyrus-IMAP 2.0.x then please consult the deprecated version 1.0.x of this HOWTO.

I strongly recommend that you upgrade to Cyrus Version 2.1.x. If you do so, you will have a better ability to get valuable support from the user community

Contributors and Contacts

First I would thank all those people who sent questions and suggestions that made the further development of this document possible. It shows me that sharing knowledge is the right way. I would encourage you to send me more suggestion, just write me an email

Why I wrote this document

There are different approaches on how to set up different mailsystems. Most documents that are available are related to Sendmail, procmail, WU-IMAPd and friends. These packages are very good but are unfortunately very inflexible in their user administration.

For a long time I was testing alternative MTA's like qmail, postfix and exim, in conjunction with IMAP/POP-servers like Cyrus, vpopmail, Courier IMAP and others.

At the end of the day, from my point of view the couple Postfix/Cyrus seems to be the most flexible and best performing solution.

All these combinations of software had one thing in common: their was very little documentation available describing how these packages work together with each other. To install the software, lot of effort has be spent to get all information needed to get all the software running.

Copyright Information

This document is copyrighted (c) 2002, 2003, 2004 Luc de Louw and is distributed under the terms of the Linux Documentation Project (LDP) license, stated below.

Unless otherwise stated, Linux HOWTO documents are copyrighted by their respective authors. Linux HOWTO documents may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions.

All translations, derivative works, or aggregate works incorporating any Linux HOWTO documents must be covered under this copyright notice. That is, you may not produce a derivative work from a HOWTO and impose additional restrictions on its distribution. Exceptions to these rules may be granted under certain conditions; please contact the Linux HOWTO coordinator at the address given below.

In short, we wish to promote dissemination of this information through as many channels as possible. However, we do wish to retain copyright on the HOWTO documents, and would like to be notified of any plans to redistribute the HOWTOs.

If you have any questions, please contact


No liability for the contents of this documents can be accepted. Use the concepts, examples and other content at your own risk. As this is a new edition of this document, there may be errors and inaccuracies, that may of course be damaging to your system. Proceed with caution, and although this is highly unlikely, the author(s) do not take any responsibility for that.

All copyrights are held by their by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark.

Naming of particular products or brands should not be seen as endorsements.

You are strongly recommended to take a backup of your system before major installation and backups at regular intervals.

New Versions

New version of this document are announced on freshmeat

The latest version of this document can be obtained from



Feedback is most certainly welcome for this document. Without your submissions and input, this document wouldn't exist. Please send your additions, comments and criticisms to the following email address : .

Please understand, that I don't want to add Cyrus-IMAP 2.0.x related stuff in this document anymore.


At the moment no translations are available. A German translation is planned and would be written by me as soon as I get the time.

Translations to other languages are always welcome. If you translate this document, please translate the SGML source. Please let me know if you begin to translate, so I can set a link here.