[Users] Filtering spam difference - auto v. manual

Pierre Fortin pf at pfortin.com
Sun Oct 29 03:03:49 CET 2017


On Sat, 28 Oct 2017 16:54:12 +0200 wwp wrote:

>Hello Pierre,
>
>
>On Sat, 28 Oct 2017 10:34:45 -0400 Pierre Fortin <pf at pfortin.com> wrote:
>
>> Hi guys,
>> 
>> Hope I'm not missing something obvious; but I recently created a top
>> level domain (TLD) filter to catch some spam messages which are not yet
>> learned by spamd -- it colors these messages to distinguish them from msgs
>> processed automatically by spamd.
>> 
>> The incoming messages are filtered as expected, and moved to my SPAM
>> folder; but if I get a message with a new TLD sourcing mostly spam, I add
>> the new TLD to the rule, then manually run 'Tools->Filter selected
>> messages' on the new msg. Everything occurs as expected, except for the
>> move to the SPAM folder -- both auto and manual filter log entries are
>> identical, ending with:
>> [10:18:35] processing rule 'SPAM-tld' [ from regexpcase ".bid>" | from
>> regexpcase ".date>" | from regexpcase ".download>" | from regexpcase  
>> ".stream>" | from regexpcase ".top>" | from regexpcase ".trade>" |
>> from regexpcase ".tv>" color 7 mark_as_spam move
>> "#mh/Mailbox/inbox/SPAM" ] [10:18:35] checking if message matches
>> [ from regexpcase ".bid>" ] [10:18:35] checking if message matches
>> [ from regexpcase ".date>" ] [10:18:35] checking if message matches
>> [ from regexpcase ".download>" ] [10:18:35] checking if message
>> matches [ from regexpcase ".stream>" ] [10:18:35] checking if message
>> matches [ from regexpcase ".top>" ]  
>> > message matches    
>> [10:18:35] applying action [ color 7 ]
>> [10:18:35] applying action [ mark_as_spam ]
>> 
>> 
>>    Aside: I was careful to make move the last action; but I see in the
>>    --debug log that sa-learn is called, so the move is redundant. I
>> know I can just hit the Spam button which will move the message to
>> SPAM; but manually filtering was to ensure my filter was correct.
>> 
>> Any reason for the move not to occur when manually filtering?  Bug?  
>
>I'd say that, if an action is not reached, it's because the previous
>one either discards the selection (email not there anymore) or returns
>something that means to stop the actions list.

I know... :) I have over 300 filtering rules between my 2 instances of CM.
The problem I'm having is that this rule works fine when filtering msgs
as they arrive.  However, if I get a message that is not caught by spamd,
or this rule; I add another test.  ie, a new spam msg from foo at bar.new
gets through, so I add:
    from regexpcase ".new>" |
and test it via 'Tools->Filter selected messages' -- everything works
except the msg is not moved, either by spamd or the explicit move.  Yet,
the next msg from baz at fubar.new will get colored, and moved to SPAM as
expected...

>Could we see the actions list? I'm not sure 

It's included in the filtering log above; but here it is from matcherrc
with line wrapping to make it easier to read:
  enabled rulename "SPAM-tld" 
    from regexpcase ".bid>" | 
    from regexpcase ".date>" | 
    from regexpcase ".download>" | 
    from regexpcase ".stream>" | 
    from regexpcase ".top>" | 
    from regexpcase ".trade>" | 
    from regexpcase ".tv>" 
    color 7 
    mark_as_spam
    move "#mh/Mailbox/inbox/SPAM"

>Regards,

Thanks for your thoughts!



More information about the Users mailing list