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

Setting Up mini-qmail

Installing mini-qmail requires two steps: installing a QMQP server or two, and then installing the mini-qmail QMQP client.

Setting Up a QMQP Server

If you already have an SMTP server running, setting up QMQP is easy, because its configuration is much simpler. The only pitfall is that QMQP has no relay protection at all, so you have to make sure that only your own QMQP clients connect to the servers. QMQP doesn't queue, which means that clients discard mail if they can't deliver it to a server immediately, so you should set up at least two QMQP servers if possible.

First, create the rules file to permit connections only from your network. Create /var/qmail/rules/qmqprules.txt:

# only allow connections from our network
:deny
172.16.42.:allow

Replace the 172.16.42. line with your own network range(s), of course. If you created a Makefile for your SMTP rules file, add the QMQP rules file to it, too, and then run make to create qmqprules.cdb:

default: smtprules.cdb qmqprules.cdb

smtprules.cdb: smtprules.txt
        cat $> | /usr/local/bin/tcprules $@ smtprules.tmp

qmqprules.cdb: qmqprules.txt
        cat $> | /usr/local/bin/tcprules $@ qmqprules.tmp

Now it's time to create the directories for the QMQP service:

# mkdir /var/qmail/supervise/qmail-qmqpd
# mkdir /var/qmail/supervise/qmail-qmqpd/log

# mkdir /var/qmail/supervise/qmail-qmqpd/log/main
# chown qmaill /var/qmail/supervise/qmail-qmqpd/log/main

And create /var/qmail/supervise/qmail-qmqpd/run:

1. #!/bin/sh 2. limit datasize 3m 3. ...

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