On Jun 26, 2004, at 12:22 PM, listes wrote:

> Then I need a "classical" filter. I set something up, which says
> - if sender is that mailserver
> - if title is "non-distribution issue" (or the exact sentence I know)
> - if body contains "Status: 5.2.2 (mailbox full)"
> (for all these conditions simultaneously)
> then I am pretty sure this is a non-distribution-related email.
> [...]
> Thus, I would like to be able to specify a filter condition like: when
> "Status: 5.2.2 (mailbox full)" appears TWICE, then...

I don't think this is possible using regular PowerMail filter 
conditions. If you don't need the first two conditions, you could 
create a SpamSieve blocklist rule that says Body Matches Regex:

        (Status: 5\.2\.2 \(mailbox full\)(\s|\S)*){2,}

If you do need the first two conditions, I think you would need to use 
an AppleScript condition. Something like:

set theString to "Status: 5.2.2 (mailbox full)"
tell application "PowerMail 5.0"
     set theMessages to current messages
     repeat with msg in theMessages
           set theBody to msg's content
         set AppleScript's text item delimiters to theString
           set theCount to (length of (theBody's text items)) - 1
         set filter criterion result to (theCount >= 2)
     end repeat
end tell

-- 
Michael Tsai                                 <http://www.c-command.com>


Reply via email to