I may well be on the wrong track here with what I'm trying to do, so I'd appreciate any advice.
Is it possible to pipe email to a script (which I have working), and then have Postfix forward it on to its original recipient using transport_maps, virtual_alias_maps or some other Postfix type thing?
Looking at the Postfix mailflow diagram, the answer is probably no because Pipe does not then go on to re-queue the message. Therefore my question is, if not, then what is the best way of doing what I am trying to do? Should my piped script (which basically dumps the email content to a text file) also be in charge of sending this on using something like sendmail? Or is there a better way?