I suspect that postfix in some way matches the whole message in once, and when the REPLACE word is given, the whole message, even including parts of message that does not match the regexp, are replaced by the "REPLACE". But I tried with (.*) before and after, and added $1 to the beginning and $4 to the end, and also changed $1$2 to $2$3, but that didnt help.
-----Ursprungligt meddelande----- From: Stuart Longland
Sent: Saturday, September 12, 2015 12:29 AM To: postfix-users@postfix.org Subject: Re: Problem filtering broken PGP mail with body_checks [Invalid] On 12/09/15 08:24, Stuart Longland wrote:
This is just a wild guess on my part, but could that possibly be matching:> -----BEGIN BLAH-----^^^^^^^^^^^^^^^> yadda yadda yadda^^^^^^^^^^^^^^^^^> -----END BLAH-----^^^^^^^^^^^^^ and giving you: $1="BEGIN", $2=" BLAH-----\r\nyadda yadda yadda\r\n-----END BLAH"?
And as most wild guesses, they can be wildly inaccurate. Just realised what the substitution would look like in that case. Apologies for the noise. -- Stuart Longland (aka Redhatter, VK4MSL) I haven't lost my mind... ...it's backed up on a tape somewhere.
smime.p7s
Description: S/MIME Cryptographic Signature