Why this patch

I wanted to use Charles Cazabon’s pymsgauth, but most of my message submissions don’t come from clients running directly on the mail server. This patch adds a Unix-filter analog of pymsgauth-mail, called pymsgauth-filter, designed to work with qmail-qfilter and acceptutils. Together, they extend pymsgauth to handle messages submitted over the network.

Without this patch

When sending a message to one of DJB’s lists, deal with qsecretary by hand. Or use a Mail User Agent that submits via sendmail(8), and have it run pymsgauth-mail instead.

With this patch

When sending a message to one of DJB’s lists, use a Mail User Agent that submits via SMTP or OFMIP, and arrange for the server to call pymsgauth-filter with the local privileges of the authenticated sender.

This is very easy to do if you use acceptutils for AUTH, and is documented there.

Get this patch

Download and apply pymsgauth-2.1.0-filter-20180519.patch (or to run under Python 3, pymsgauth-2.1.0-filter3-20180806.patch).

(Generated with git diff pymsgauth-2.1.0 pymsgauth-2.1.0-filter-20180519.)

Improve this patch

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