Why this patch

I wanted to modify messages bound for remote systems via a simple Unix filter interface. Reasons:

  • SRS-rewriting outbound messages requires patching qmail-remote(8).
  • DKIM-signing outbound messages requires a surprisingly intricate script.
  • If it were easy to modify outbound messages, I’d probably think of more applications.

Without this patch

To SRS-rewrite outbound messages, apply Marcelo Coelho’s SRS patch.

To DKIM-sign outbound messages, use Kyle Wheeler’s qmail-remote wrapper (preferably with my QMAILREMOTE patch).

With this patch

  • qmail-rfilter would be to qmail-remote as qmail-qfilter(1) is to qmail-queue(8): an easy way to run filters on outbound messages.
  • qmail-rfilter-remote would be a QMAILREMOTE wrapper that runs qmail-rfilter with the sequence of programs in control/remotefilters (akin to qmail-qfilter-ofmipd-queue for QMAILQUEUE).
  • qmail-rfilter-srsforward would be a filter that SRS-rewrites envelope senders. I’d list it in control/remotefilters.
  • qmail-rfilter-dkimsign would be a filter that signs messages with DKIM. I’d list it (last) in control/remotefilters.

Get this patch

The qmail-rfilter patch doesn’t exist. If you’d like it to, let me know!