spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pedro David Marco <>
Subject Re: Understanding header ALL
Date Thu, 06 Dec 2018 20:25:57 GMT
 Thanks Bill and John...
Your words make sense to me. It seems that ALL means that SA puts all headers into a Perl
string (including \n chars) and tries the regex...
As John Hardin correctly states,  a dot does not match  the \n  but this is changed with
the "s" regex flag.  
In fact it works like a charm if i try a rule like this:
   header        TESTRULE2         ALL  =~   /From=.*pedro.*  To=.*pedro.*/ism 
This is a mistery...  :-?
Thanks to all...

    On Thursday, December 6, 2018, 8:32:46 PM GMT+1, Bill Cole <>
 On 6 Dec 2018, at 13:36, Pedro David Marco wrote:

>  Thanks a lot Bill..
> i already considered the "multiple" flag and it did not work 
> either...   i mean... the rule works but i only see the first line 
> in Debug mode...
> ----Pedrod

Having pondered this for a bit and looked at unhelpful docs, I *think* I 
understand what's going on.

You cannot get multiple hits from an ALL rule because the regex is 
matched against the whole block of headers. Once it matches, the test is 

It might make sense to add an "ANY" pseudo-header that tests against 
each header, rather than "ALL" which tests against the whole text of all 
the headers.

Bill Cole or
(AKA @grumpybozo and many * addresses)
Available For Hire:
View raw message