On Tue, 3 Feb 2015 11:21:17 +1300
Jeremy Bowen <jer...@smartpoint.co.nz> wrote:
> I think I can do what I need to accomplish more accurately &
> efficiently with sed and procmail. I'm just not quite sure how I
> would go about configuring postfix to make this operate on outgoing
> mail. Any advice ?

OK, I've started with the FILTER_README and, using the "Simple
Content Filter" example, have come up with a simple shell script which
modifies the message the way I need it.
I've tested this with:
% /usr/local/bin/myscript -f sender -- recipient... <message-file

From here it looks like I need to initially  add the following lines to
master.cf:
filter    unix  -       n       n       -       10      pipe
    flags=Rq user=filter null_sender=
    argv=/usr/local/bin/myscript -f ${sender} -- ${recipient}

This filter should pick up email from the "submission" service. What
do I need to do from here ? (I already have a
"-o content_filter=dksign:[127.0.0.1]:10027"
in the submission definition handling signing of outgoing email. )

Also, it appears that this approach may not be ideal as I don't think I
can restrict things to only apply this on mail with a certain Subject:
header. Am I on the right track here ?

Thanks again.

Reply via email to