You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Mattias Nordstrom <no...@realnode.com> on 2005/05/03 14:05:31 UTC

Combining whitelist_from and to

Hi,

I'd like to create a filter that allows all mail from a specific domain to get
whitelisted to a specific user. So e.g. something like this:

if (from == *.tld && to == someone@somewhere) then whitelist

is what I'm looking for. Basically combining the whitelist_from and whitelist_to
to create the actual whitelist rule. Is this possible with the current SA?

Thanks!

-- 
Mattias Nordstrom
CTO
Realnode Oy

nordstrom@realnode.com
www.realnode.com


Re: Combining whitelist_from and to

Posted by David B Funk <db...@engineering.uiowa.edu>.
On Tue, 3 May 2005, Loren Wilton wrote:

> Use a meta:
>
> header __MY_FROM    From =~ /from\.tld/
> header __MY_TO To =~ /someone\.somewhere/
> meta MY_FUNNY_WHITELIST __MY_FROM && __MY_TO
> score MY_FUNNY_WHITELIST 10
>
>         Loren

Um, for a whitelist shouldn't that be a -10 for the score?
Note that both the to: & from: are easily forged by a spammer so
this rule could be subject to abuse.

-- 
Dave Funk                                  University of Iowa
<dbfunk (at) engineering.uiowa.edu>        College of Engineering
319/335-5751   FAX: 319/384-0549           1256 Seamans Center
Sys_admin/Postmaster/cell_admin            Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{

Re: Combining whitelist_from and to

Posted by Loren Wilton <lw...@earthlink.net>.
Use a meta:

header __MY_FROM    From =~ /from\.tld/
header __MY_TO To =~ /someone\.somewhere/
meta MY_FUNNY_WHITELIST __MY_FROM && __MY_TO
score MY_FUNNY_WHITELIST 10

        Loren


Re: Combining whitelist_from and to

Posted by Theo Van Dinter <fe...@kluge.net>.
On Tue, May 03, 2005 at 12:05:31PM +0000, Mattias Nordstrom wrote:
> if (from == *.tld && to == someone@somewhere) then whitelist
> 
> is what I'm looking for. Basically combining the whitelist_from and whitelist_to
> to create the actual whitelist rule. Is this possible with the current SA?

Not with the whitelist* options.  You'd have to write your own rules to match
the from and to, then a meta rule to combine them.

-- 
Randomly Generated Tagline:
"Jab, Jab, Oooh. O(n log n)! Ha! Tail recursion! Thrust! Parry! <BOING>"
         - Jim Flanagan