Im trying to filter broken PGP mail into usable mail with body checks. I have selected to use pcre: when defining body_checks.
The problem is that certain PGP useragents, inserts a \r charachter, a tab, space, or any other whitespace char immediately before or after the “-----BEGIN PGP MESSAGE-----“ header. So the rule is as follows: /[ \t\r\f]*-----(BEGIN|END)([^-]*)-----[ \t\r\f]*/ REPLACE -----$1$2----- The problem with this, is that this removed the whole body of the mail except for the -----BEGIN PGP MESSAGE----- line. What are im doing wrong? I have tried with different flags like /s or /si and such, but still it removes the whole body. I want it to scan line for line and process it.
smime.p7s
Description: S/MIME Cryptographic Signature
