Why this patch

It’s like the QMAILQUEUE patch, but for qmail-remote(8). If you want to wrap qmail-remote with another program — for instance, to DKIM-sign outgoing mail — this patch may be useful to you.

Without this patch

To have qmail-rspawn(8) run a different qmail-remote program, move the original aside:

# cd /var/qmail/bin
# mv qmail-remote qmail-remote.orig
# mv qmail-remote-wrapper qmail-remote

Your wrapper needs to adhere to the qmail-remote(8) interface, and should almost certainly conclude its work by running qmail-remote.orig.

With this patch

To have qmail-rspawn(8) run a different qmail-remote program, set an environment variable in /var/qmail/rc (or wherever you invoke qmail-start(8)):

QMAILREMOTE="qmail-remote-wrapper"

Your wrapper needs to adhere to the qmail-remote(8) interface, and should almost certainly conclude its work by running qmail-remote.

Get this patch

This patch is included in notqmail 1.08 and newer. Otherwise, download and apply notqmail-1.07-tls-20190517-qmailremote-20190819.patch.

(Generated with git diff notqmail-1.07-tls-20190517 notqmail-1.07-tls-20190517-qmailremote-20190819.)

Improve this patch

If you see a simpler way to do it, I’d love to know.