On Mon, 2010-07-12 at 00:06 +0200, Michelle Konzack wrote:
> > On Sun, 11 Jul 2010, Karsten Bräckelmann wrote:
> > > What about providing some raw From: headers then?

> From coupond...@perezcentral.com Sun Jul 11 17:21:41 2010
> Return-Path: <coupond...@perezcentral.com>

Err, didn't you say you don't have the Envelope From, and your MTA shows
the same as the mangled From: headers?


> From: "Coupon Dept." <CouponDeptdOS_V`CcOP 
> IW^GIdATOn2PbJK_/v...@perezcentral.com>

  header FOO  From:addr =~ m~[/ ]~

Works for me. Just a minimal example rule, in particular leaving out the
pesky backtick, confusing bash parsing the ad-hoc test rule. ;)

  spamassassin -D --cf="header FOO From:addr =~ m~.+~"

shows, that From:addr contains the entire string contained in the angle
brackets. I wonder, where your problems where writing the rule.

Debugging and ad-hoc rule development hint: See the --cf option as used
above. Together with -D, SA will report the matching substring. Then,
just craft a bare-minimum "mail message", containing the stuff you want
to trigger on. Generally, looks like this. Optionally use --cf to
disable AWL and Bayes respectively.

  echo "From: ...\n\n" | spamassassin -D

Hmm, writing this post took much longer than writing the rule... ;)

  guenther


-- 
char *t="\10pse\0r\0dtu...@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; }}}

Reply via email to