QMQP and QMTP Dan has invented two host-to-host protocols for people who aren't thrilled with SMTP. Despite their similar names, QMQP and QMTP are not compatible with each other and are intended for very different purposes. Qmail comes with servers for both, called qmail-qmqpd and qmail-qmtpd. Both run from tcpserver and are set up the same way as qmail-smtpd. The simpler one is Quick Mail Queueing Protocol (QMQP) described at http://cr.yp.to/proto/qmqp.html. QMQP is currently used only by mini-qmail, a stripped-down version of qmail that passes all mail directly to a smarthost for delivery. It has no queueing, no secondary hosts, and no internal security. To avoid creating open spam relays, the TCP rules for tcpserver must permit connections only from known friendly hosts and deny connections from everywhere else. Mini-qmail is primarily useful to pass incoming mail across a firewall, and to run on clusters of computers that share a single smart host (running regular qmail) for mail queueing and delivery. It's also occasionally useful for mailing list load sharing with ezmlm running on one host, passing messages for delivery to a smarthost. See Chapter 17 for details of setting up mini-qmail. QMQP does not require or encourage single recipient deliveries; if a message has many recipients, the message and all of the recipient addresses can be transferred quickly via QMQP. This means that for mailing list load sharing, there's no need to split or cache the subscriber database on the smarthost. For each message distributed to a list, ezmlm can send the message and all of the recipient addresses quickly via QMQP, even if there are many recipients. Quick Mail Transfer Protocol (QMTP) is intended as a replacement for SMTP. It's much simpler than SMTP, and just transfers a messages along with an envelope sender and a set of envelope recipients. To receive QMTP mail, set up qmail-qmtpd the same way you set up qmail-smtpd. To control mail relay, it uses the same rcpthosts and morercpthosts files and RELAYCLIENT tcpserver variable as qmail-smtpd. The only QMTP client currently available is in the serialmail package, maildirqmtp, which is invoked exactly the same way as maildirsmtp. Although QMTP indisputably transfers mail faster than SMTP, almost nobody uses it. Partly this is because the QMTP client isn't integrated into qmail (and isn't available at all in other MTAs), but mostly this is because there's no standard way for a server to announce that it has a QMTP server available, analogous to a DNS MX record for SMTP. Dan proposed in 1997 to redefine the distance value in MX records to encode both the server distance and the service (smtp, qmtp, etc.), and Russ Nelson offers a patch to make qmail-remote use both qmtp and smtp, but QMTP remains an oddity not in general use. |