The OP includes information that you clearly ignored.
If you step out of Postfix for a moment, and read the OP again, then you
cannot fail to see a Perl Compatible Regular Expression that works
exactly as intended on the e-mail body when saved as a file. From the
same standpoint, you cannot fail to see that exactly the same Perl
regular expression fails when run by Postfix. Therefore, you cannot say
that Postfix is merely using pcre, because the facts prove otherwise.
If you read pcre_table(5) again, then you cannot fail to see that the
PCRE is using the Postfix-allowed syntactically valid /Am modifier.
Therefore, the input string MUST start from the very beginning of the
body (/A), and include newlines (/m); in this case, Postfix's "input
string" is still a single line of text, even if the original input is a
multi-line text.
Finally, you cannot fail to see that the PCRE is using the
Postfix-allowed syntactically valid \A and \z. Therefore, the pattern
matching MUST NOT reduce \A to ^ and \z to $ in the presence of /Am.
The suggestion to allow postfix to read the entire message body, except
the attachments, aims at finding a balance between the intended
behaviour of PCRE and Postfix's claim that "reading the entire message
into memory does not scale well", so that we can use the above
Postfix-allowed syntactically valid PCRE on the plain text part of the
body, ignoring the encoded parts.
Anyway, I am out of this thread. I have made myself clear to the extent
of being pedantic. I understood the answer of Venema, and I am not
fighting against it. On the contrary, I adapted to the status quo. My
only concern is the impossibility of using Postfix syntax without
incurring into a semantic error.