Why this patch

This is the same idea and code as Bruce Guenter’s QMAILQUEUE patch that’s included in netqmail, but for mess822. If you want to modify submitted messages in arbitrary ways, above and beyond mess822’s own rewriting features, this patch may be useful to you.

I take advantage of this patch in conjunction with acceptutils and pymsgauthfilter.

Without this patch

To wrap qmail-queue(8), move the original aside:

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

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

With this patch

To wrap qmail-queue(8), set an environment variable wherever you invoke ofmipd(8) and/or new-inject(!):

QMAILQUEUE="bin/qmail-queue-wrapper"

One such wrapper is qmail-qfilter-ofmipd-queue from rejectutils.

Get this patch

Download and apply mess822-0.58-qmailqueue-20170527.patch.

Improve this patch

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