On Sun, Sep 01, 2013 at 03:02:36PM -0400, Bruce Markey wrote: > I'm hoping someone on here can maybe point me in the right direction. > > I'm trying to simply pipe all incoming email to a perl script that > then dumps back to postfix to deliver. Pipes in by STDIN and then > hands it back via STDOUT. > > This is the script. > https://grepular.com/Automatically_Encrypting_all_Incoming_Email > > I've read this http://www.postfix.org/FILTER_README.html about 50 > times so far. > > I tried the simple filter and that didn't work. Well it did but I > realized it expected the script to then deliver the message.
This is a mistaken impression. The script typically re-injects the mail into Postfix via the sendmail(1) command. Make sure to not pass the "-t" option and to safely pass the envelope recipients on the sendmail(1) command-line. A better architecture is to embed your Perl code into a transparent SMTP proxy. -- Viktor.