Why this patch
This patch sets QMAILPPID
to the PID of your
qmail-qfilter(1)
filter’s grandparent (in other words, the process that called
qmail-qfilter
). If you’re writing custom filters that you’d like to
correlate with qmail-smtpd
or ofmipd
sessions, this patch may be
useful to you.
Without this patch
Find some other way to correlate invocations of your filter with
qmail-smtpd
or ofmipd
sessions.
With this patch
In your filter, log the value of QMAILPPID
. In the logs, observe the
PID, then search for other instances of it.
Get this patch
Download and apply qmail-qfilter-2.1-grandparent-20171026.patch.
(Generated with git diff 2.1 qmail-qfilter-2.1-grandparent-20171026
.)
(Merged upstream as pull request #2.)
Improve this patch
If you see a simpler way to do it, I’d love to know.