« Return to Thread: X-Mailer: domain

Re: X-Mailer: domain

by Charles Gregory :: Rate this Message:

Reply to Author | View in Thread

On Wed, 1 Jul 2009, Karsten Bräckelmann wrote:
> Be careful with 'full' rules. You'd better paranoidly anchor your RE and
> strictly limit matching....

(nod) This is why my original question was about using the 'capture'
function. What I WANT to use for a ruleset is something like:

header LOC_FROM From =~ /[^<]*<([^>]+)(?^N $LOCVAR_FROM=\1)>/
rawbody LOC_BODYTOP /^[^a-z](Dear|Hello|Hi),? $LOCVAR_FROM/

But Spamassassin says that eval (in the first rule) is disabled.....

But that is a mechanism I would love to use, rather than the longer
syntax that you've shown. It allows for simple multiple tests,
for the from addres in To, Subject, top of body, etc, without re-scanning
the header for the From line each time....

> I *strongly* suggest a plugin for this purpose.

My suggestion hinges on *one* important question:
Do the rules in the user .cf files get processed IN ORDER?
Or does spamassassin perform some sort of optimization that combines
different rules into one 'scan'? If the former, then capturing a variable
value in one rule to be used in subsequent rules would work easily, just
by enabling those 'eval's. But if the latter, then your /msi code is the
only way to do what I want. :)

- Charles

 « Return to Thread: X-Mailer: domain