On Fri, 2013-03-29 at 00:56 +0000, John Levine wrote: > The Authentication-Results: header defined in RFC 5451 can describe > the SPF and DKIM status of a message. It's typically added by the > SMTP daemon as the message is received. > > Is there any way to tell spamassassin to look at the A-R header rather > than trying to rerun the SPF and DKIM checks itself?
I didn't follow this stuff closely, but I'd guess this basically involves re-implementing M::SA::Plugin::DKIM and M::SA::Plugin::SPF. If I'm wrong, Mark will certainly correct me. ;) Most likely not what you hoped for, but this might be way easier than it sounds. Both DKIM and SPF checks are in dedicated plugins, thus trivial to be disabled entirely. Their respective eval() rules are properly guarded by ifplugin. See 25_dkim.cf and 25_spf.cf. Not looking at RFC 5451, I just assume the Authentication-Results header is clearly structured. Which would render the seemingly expensive task of "re-implementing" the plugins just a handful of plain, straight forward header RE rules. Granted, you'd not get all the plugins' fine-tuning options. For that, you likely would have to actually re-implement their eval() rules. Again, with a structured header to base off -- might be pretty straight forward, too, since the eval() code can use the same header. -- 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; }}}