SpamAssassin rawbody multiline rules do not work in base64 encoded e-mail

Solution Verified - Updated -

Issue

SpamAssassin rawbody multiline rules do unfortunately not work in base64
encoded e-mails as they should. Compressed spam samples attached, which
do not match, while the regular expression itself matches properly, if the
base64 is decoded manually.

Put the following three lines into "/etc/mail/spamassassin/local.cf":

rawbody  TEST_EXAMPLE /<a[^>]+href="http:\/\/[^"]+\/[^"]+\?[^"]+\.example\.com[^"]+"[^>]*>https:\/\/(us|www)\
\.example\.com\/[^<]+<\/a>/i
describe TEST_EXAMPLE Fraud link for https://(us|www).example.com/ pointing to a completely other domain
score    TEST_EXAMPLE 2.0

Running "spamassassin --lint" will confirm that everything is fine with
the syntax.

  1. Enable the SpamAssasin rule as above
  2. xzcat sample.eml.xz | spamassassin
  3. xzcat sa-verification.pl.xz | perl

Actual results:
SpamAssassin rawbody multiline rule does not work in base64 encoded e-mail.

Expected results:
SpamAssassin rawbody multiline rule works in base64 encoded e-mail.

Environment

  • Red Hat Enterprise Linux (RHEL) 5
  • Red Hat Enterprise Linux (RHEL) 5
  • spamassassin-3.3.1-2.el5
  • spamassassin-3.3.1-2.el6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content