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

Download and apply netqmail-1.06-qmailremote-20170716.patch.

(Generated with git diff netqmail-1.06 netqmail-1.06-qmailremote-20170716.)

Improve this patch

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