http:// qmail.jms1.net /

qmail Information

2008-08-08 You may now select which stylesheet you want to use for this web site.

I started using qmail to handle email on my own server, and those of my employers, back in 1998. I have been very happy with it, and have yet to find any real cause for complaint. Every time I have found something I needed that it wouldn't or couldn't do, I found that either somebody had already written a patch to do what I needed, or I was able to write such a patch myself.

If you're not familiar with it, qmail is a mail transfer agent (MTA), or "mail server software". Unlike other MTAs like sendmail, which encapsulate all of their functions into one massive program, qmail is built as a collection of tiny programs, each of which does its one little piece of the puzzle, and does it well. This makes each individual program much easier to test and debug.

The official qmail web page is written and maintained by qmail's author, Dan Bernstein. Dr. Bernstein has written several other software packages, including daemontools, djbdns, and ucspi-tcp which are all very useful (especially on a machine running qmail.)

The un-official qmail.org site is written by other qmail "fans". This is where you will find a large collection of patches, as well as links to other information for people who are running, or thinking about running, qmail.

Life with qmail is a document which contains a fairly complete walk-through of installing qmail and configuring it for the first time. I hadn't seen this until after I had been running qmail for a few years, but the directions here are quite similar to how I have it set up. Very much recommended for people who are trying qmail for the first time and aren't used to it yet.

The big qmail picture is a set of diagrams (in GIF, PS, or PDF format) which show the various programs which make up qmail and how they relate to each other. These images were a major part of my own process of learning about how qmail works- in fact, at one of my former jobs (at an ISP) I printed out all four pages with a 36-inch plotter and hung them on the wall, just to refer to as needed.

Back in 2006, I made a few diagrams which are similar to the "qmail big picture", but which include programs outside of qmail that are commonly used with qmail (things like rblsmtpd, simscan, and so forth.) It used to be two separate diagrams, however I have since purchased a new version of OmniGraffle (yes, I pay for my software) and am now able to create multi-page diagrams, and export them as multi-page PDF files. I've also expanded the diagram to three pages:

  1. Incoming: how mail gets into the queue, whether from a remote client or from a process on the local machine.
  2. Outgoing: how mail gets out of the queue, whether it's going to a local mailbox or to a remote server.
  3. Retrieval: how MUAs and most webmail systems access the messages stored in the mailboxes.

Note that this diagram is not meant as a deep reference, but as an overview to help you understand how the various programs "fit" with each other.

File: qmail-system.pdf
Size: 269,448 bytes
Date: 2009-04-07 01:21:13 +0000
MD5: 9e2c564d6573a63b75ffa22e7e96c07e
SHA-1: 1e07f736d9a991eb3d29d88093c028c6e0a4bf36
RIPEMD-160: 22676097ee51de09665525e27df5c17a113d4db1
PGP Signature: qmail-system.pdf.asc

2008-04-25 I have recently started making regular use of the Subversion source code revision control system, with the Trac web front-end. This page on my regular web site explains how I set up the software. As an example, I have placed the "source code" of this web site under a repository, with a trac interface to look at changes over time.


Patches

I have moved this section to a page of its own because it was getting to be too long.


Scripts

I have also moved this section to a page of its own.


HOWTO pages

I have written a page which explains how to set up an SMTP service. This should be handy if you need multiple servers (i.e. one on port 25 for normal incoming mail, and an SSL-secured on port 465 to allow your users to AUTH and relay mail securely. I've also written a page on the options for TLS/SSL and AUTH, and a page on how to use the SMTP AUTH command when testing a server. It also shows how to use openssl to connect to an SMTP server which is using SSL or TLS to secure the connection.

I have written a page on getting ClamAV and Qmail-Scanner to work together. I've also written one explaining how to upgrade an existing ClamAV install on an RPM-based distro.

I have written a page which details how to use my "qfixq" script to repair a damaged queue. This page is listed on the scripts page, but I feel it also deserves a special mention here.

I have written a page which talks about how to work with qmail's log files. It will explain a few different things which can be done with the log files, such as tracing a message as it goes through the server.

I have written a page which explains how relaying works under qmail. I tried to explain how the RELAYCLIENT variable and the rcpthosts file affect qmail-send.

I have written a page which explains the so-called "silly qmail syndrome", along with a patch to fix the problem.

I have written a page which explains the issues that people seem to run into when they upgrade from qmailrocks 2.2.0 to my current combined patches.

I have written a page which explains how to set up what I call a "Mailhub", which is a machine whose only job is to handle RBL, virus, and spam scanning for mail arriving from the outside world, and forwards all "clean" messages to a dedicated mailbox server.

I have written a page which explains how to run vpopmaild under daemontools. vpopmaild is a service included with vpopmail 5.4.15 (and later) which allows clients to perform the same functions as the vpopmail command line programs, without having to SSH into the machine and run the programs directly. It also makes it possible, once I write the code to do it, for qmail-smtpd to validate an AUTH command without having to fork() and exec() another process. The page also includes a quick example of how to test the service once it's running.

I have written a page which explains how to un-install sendmail from RedHat and friends... or maybe a better description would be "how to make the RPM database believe that you have an MTA installed, even though you didn't install it through the RPM mechanism".


Related Packages

There are several other programs related to qmail which I also use on the servers I build. For the most part I am using them exactly as their authors originally intended, but there are some specific customizations I have done, particularly in the scripts which run the services involved.


Mailing Lists

I am hosting two public mailing lists on my server which relate to qmail. One is a two-way discussion list, primarily focused on my combined patch but also open to general discussions of qmail and/or anything you see on this web site. The other is a one-way announcement list, where I announce new versions of the combined patch and any major changes to the web site.


Old HOWTO pages relating to courier-imap

I stopped using courier-authlib and courier-imap on my own server in May 2008, when the developer of courier-authlib announced that he would no longer support his own code to make courier-authlib work with vpopmail.

I now use dovecot instead.

I'm leaving these pages here in case anybody needs them, however I don't plan to update them anymore.

Running courier-imap under daemontools

Running courier-authlib under daemontools

Running courierpassd under daemontools

Building Courier-IMAP RPMs without FAM


Other Information