Yet Another Ninja wrote:
> On 12/20/2007 10:44 PM, jikke wrote:
>> Hi,
>>
>> I'm new to SpamAssassin and have checked the web on spam rules. I
>> just can't
>> seem to find the info I'm looking for. I want to create a rule where all
>> mail to [EMAIL PROTECTED] with a certain text like 'new message' is
>> passed
>> through and all other mail is considered spam. This quite a different
>> rule
>> from what I've found so far. All rules I have found just block email
>> and I
>> need a rule that actually let's just that mail through.
>>
>> Any ideas? 
>
> lots.. but for starters:
>
> header    __TOHELPDESK    To =~ /[EMAIL PROTECTED]/
> body    __NEWMSG    /new message/i
> meta    PASS_HELPDESK    (__TOHELPDESK && __NEWMSG)
> score    PASS_HELPDESK    -50.0
Well, that would work, but to get the affect he wants you'd also have to
heavily drop the required_score. He's not looking for a whitelist rule,
but a blacklist..

An even simpler approach would be to treat each problem separately, and
penalize anything not matching. i.e.: heavily penalize all mail that's
not to the help desk, and speparately, penalize all mail that doesn't
have "new message" in it.

header NOT_TO_HELPDESK   To !~ /[EMAIL PROTECTED]/
score NOT_TO_HELPDESK 100

body    __NEWMSG    /new message/i
meta  NOT_NEWSMG (!_NEWMSG)
score NOT_NEWMSG 100



But as others have said, procmail would do this much faster and lighter.
Heck, the To part can probably be dealt with at the MTA layer and save a
lot of trouble..

Reply via email to