O'Reilly logo

qmail by John Levine

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 17. Many Qmails Make Light Work

Qmail is well-suited for environments with multiple computers working together, as well as multiple copies of qmail dividing up work in various ways. This chapter starts by looking at the aspects of qmail useful for multiple operation and then explains some common applications.

Tools for Multiple Computers and Qmail

Here’s a quick rundown of the tools in our multisystem toolbox.

Multiple Copies of Qmail

Normally, all of qmail is installed in /var/qmail. That directory is specified at build time in conf-qmail. If you change the contents of conf-qmail to, say, /var/qmail2 and rebuild and install qmail, you’ll create a complete second copy of qmail along with its queue directories. You can send mail into it using /var/qmail2/bin/qmail-queue or any of the programs that call it, such as /var/qmail2/bin/forward, or by using tcpserver to run a SMTP service with /var/qmail2/bin/qmail-smtpd. Outbound mail works normally, although you can control it using the standard mechanisms such as concurrencyremote and smtproutes.

Remember that qmail’s queue cannot be on a shared or remote disk; a single local copy of qmail-send has to manage each queue.

To pass mail for particular domains from one copy of qmail to the other, you can use either SMTP or virtualdomains. To use SMTP, set up a SMTP daemon for the second copy of qmail on localhost (127.0.0.1), but listening on port 26 or any other unused port. Then in the control/smtproutes/ in the first copy, route the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required