You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2007/07/12 17:10:30 UTC

Re: svn commit: r555646 - /spamassassin/rules/trunk/sandbox/jm/20_basic.cf

Theo Van Dinter writes:
> Please tell me that I'm not seeing new full rules... ;)

New full _test_ rules ;)

Seriously though -- these should be reasonably efficient (as efficient
as full rules can get), since (a) they're long uncommon strings and (b)
there are no metacharacters of any kind involved.

> /me thinks we need to have a new plugin rule type.  Perhaps like:
> 
> rawmatch PDF_1 eval:rawmatch('^application/', '\AJVBERi0xLjMgCjEgMCBvYmoKPDwKPj4KZW5kb2JqCj')
> 
> and then rawmatch() would simply find_parts(qr/$1/i,1) and return $part_raw=~/$2/.
> 
> there could also a decoded and rendered match() as well since it's a trivial
> addition.

+1.  It should really be a new ruletype though, so that they can be
compiled like the native ruletypes are...

--j.