Discussion:
[PATCH] Document that email body is split into chunks when matching using 'rawbody'
Ondřej Lysoněk
2018-11-14 16:45:23 UTC
Permalink
Hi,

the below patch documents a problem where, in some cases, body pattern
matches don't match even if they technically should. The problem is that
the email body is split up into chunks for performance reasons (see
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=5717), so a pattern
will not match if the matching text spans multiple chunks.

Index: lib/Mail/SpamAssassin/Conf.pm
===================================================================
--- lib/Mail/SpamAssassin/Conf.pm (revision 1846591)
+++ lib/Mail/SpamAssassin/Conf.pm (working copy)
@@ -3124,6 +3124,8 @@
text will be decoded from base64 or quoted-printable encoding, but HTML
tags and line breaks will still be present. Multiline expressions will
need to be used to match strings that are broken by line breaks.
+Note: the text is split into 1 kB - 2kB chunks so your expressions may
+unexpectedly stop matching where they should.

=item rawbody SYMBOLIC_TEST_NAME eval:name_of_eval_method([args])

===================================================================

Best regards
Ondřej Lysoněk

Loading...