I'm struggling to get procmail to first transform, and then forward, a received email. Here's what I'd like to do:
:0 f | ~/bin/encryptemail.pl | mail firstname.lastname@example.org
That is, I want to run the encryptemail.pl script on the body of email that I receive, and then forward the encrypted email to email@example.com .
Piping the output to mail sort of works, except that the forwarded email is wrapped in a second set of headers.
I'd like to cleanly forward the encrypted email so that the body of the original email has been replaced with the encrypted content.