D. J. Bernstein
Internet mail

Moving large sendmail sites to qmail

Are you upgrading your site from sendmail to qmail 1.03? This page is a checklist of compatibility issues.


Install dot-forward (already included in precompiled var-qmail packages) so that qmail looks for .forward files.

Some of your users might have :include: deliveries or file deliveries in their .forward files. Look for / in .forward files, and set up .qmail files for those users if necessary.


Set up /var/qmail/rc (already included in precompiled var-qmail packages) to invoke the same delivery agent that sendmail uses, as discussed in INSTALL.vsm. This way mail will continue to be delivered to /var/spool/mail just as it was before.


Install fastforward (already included in precompiled var-qmail packages) so that qmail uses /etc/aliases.

fastforward understands almost all of sendmail's /etc/aliases syntax. It doesn't support file deliveries, but fastforward's newaliases checks for file delivery attempts and warns you about them, so you can set up .qmail files for those aliases.

You will have to run newaliases whenever /etc/aliases changes. Also, whenever a user changes an :include: file, he will have to run newinclude. (sendmail's handling of :include: files is unreliable, as discussed in the newinclude man page.) To make majordomo 1.94.* work with qmail, insert

before the lclose(LIST) line in do_subscribe and do_unsubscribe in majordomo.

Note that .qmail files in ~alias do not override deliveries to users; see the qmail pictures. If you have an account that should not receive mail, simply chown root ~account. (Alternatively, use qmail-pw2u's exclude feature; see FAQ 4.9.)

NFS automounts

If user home directories are unreliably automounted, set up the qmail-users mechanism as discussed in FAQ 4.9.

Basic configuration

Make sure that /var/qmail/control/locals and /var/qmail/control/rcpthosts contain all the names that were listed in sendmail's Cw.

qmail disables relaying by default. If you want to allow selected clients to relay messages through your server, see FAQ 5.4.


Unlike sendmail, qmail by default does not rewrite messages that clients send through SMTP, including through sendmail -bs.

Pine uses sendmail -bs. It puts together a complete header, but it does not have as many header-rewriting features as qmail-inject. If you have Pine users who want to use qmail-inject's features, see FAQ 6.2.

MH uses sendmail -bs. Depending on its configuration it may or may not put together a complete header. If you have any MH users, see FAQ 6.3. Alternatively, install nmh, using ``./configure --with-mts=sendmail''.