spamassassin-users October 2010 archive
Main Archive Page > Month Archives  > spamassassin-users archives
spamassassin-users: Re: Whitelist questions

Re: Whitelist questions

From: Karsten Bräckelmann <guenther_at_nospam>
Date: Wed Oct 06 2010 - 00:22:30 GMT

On Tue, 2010-10-05 at 13:16 -0700, John Hardin wrote:
> On Tue, 5 Oct 2010, Karsten Bräckelmann wrote:

Your MUA still can't handle UTF-8, eh? Fixed my name. ;)

> > If there really is no way to use whitelist_from_rcvd, you of course
> > always can write custom header rules, matching against the pseudo header
> > X-Spam-Relays-Internal or friends, carefully constructing the RE to
> > match a specific Received header by constraining it with the square
> > brackets surrounding each relay.
> Perhaps whitelist_from_rcvd should recoginze IP syntax and ignore the
> rDNS, so this would work:

spamassassin -D < $msg 2>&1 | grep X-Spam-Relay # untested

> whitelist_from_rcvd []
> ...not that I'd want to maintain IP-based whitelists...

It is quite easy to write such a white-listing rule yourself, using the
Relay pseudo-headers. And yes, a whitelist_from_ip setting plugin as
Alex mentioned would be quite easy as well.

However, if there is any need for a hack like that, it likely doesn't
affect a single recipient (which would rule out writing the plugin
anyway), but lots of recipients. Better fix the sender's infra, so
everyone will benefit from that.

Fix sender. Rather than having every single recipient, now and in the
future, fix it locally for him.

-- char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}