deliver-qmail: .qmail delivery for Exim4 and Postfix

Last year we decided to migrate vvtp.tudelft.nl from Qmail to Exim4 for mail delivery, to be able to reject spam and virussen during the SMTP session and for added flexibility and because we didn't like Qmail's licensing terms.

Of course this wasn't trivial due to the extensive use of .qmail files for creating mailinglists and delivering email to alternative mailboxes by our more than 250 users. So a solution had to be created in the form of a local delivery agent that understands .qmail files.

This page contains a Python program deliver-qmail and the part of our Exim4 config that concerns Qmail delivery. This program can also be used for the Postfix mailer.

Features include:

  • Delivery to mbox and Maildir folders
  • Email forwarding
  • Support for .qmail-owner and .qmail-owner-default for forwarding (including VERP for Postfix)
  • Supports qmail's exitcode 99 (delivery OK, but ignore remaining .qmail lines)
  • Sets up the environment with the same variables as qmail does
  • Support .forward fallback (optional)
  • User log in ~/.deliver-qmail.log
  • Users can configure the behavior in ~/.deliver-qmail.conf
  • Correct exception handling with mail deferral instead of dropping it
  • If you want to, you can use different .qmail paths, like ~/.q/foo instead of ~/.qmail-foo. Thsi can be configured in ~/.deliver-qmail.conf (dotfiledir=~/.q under [features])

This program tries to be as compatible as possible to qmail's qmail-local. (man page).

deliver-qmail.py
exim4 config

Subversion read-only access: https://secure.wojas.nl/svn/vvtp/deliver-qmail/trunk/

Please let me know if it's of any use to you!

What users say:

"Just wanted to thank you for deliver-qmail! It made it painless for me to migrate my server from qmail to Postfix, while preserving everyone's .qmail files."

Update 17-05-2008: Nothing changed, just wanted to mention I still rely on this program. It hasn't been updated lately, because no bugs have been found and it's not my goal to add loads of new features.