spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pedro David Marco <pedrod_ma...@yahoo.com>
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...
---PedroD



    On Thursday, December 6, 2018, 8:32:46 PM GMT+1, Bill Cole <sausers-20150205@billmail.scconsult.com>
wrote:  
 
 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 
done.

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
bill@scconsult.com or billcole@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Available For Hire: https://linkedin.com/in/billcole
  
Mime
View raw message