On Thu, 2014-09-04 at 13:54 -0600, Philip Prindeville wrote: > On Sep 3, 2014, at 7:36 PM, Karsten Bräckelmann <guent...@rudersport.de> > wrote:
> >> header __KAM_PHIL1 To =~ /phil\@example\.com/i > >> header __KAM_PHIL2 Subject =~ /(?:CV|Curriculum)/i > > > > Bonus points for using non-matching grouping. But major deduction of > > points for that entirely un-anchored case insensitive 'cv' substring > > match. > > I’d anchor both matches, Generally correct, of course. For anchoring the To header regex, I suggest using the To:addr variant I used in my rules. That way the address easily can be anchored at the beginning /^ and end $/ of the whole string, which equals the address. Without the :addr option, proper anchoring is a real mess. > or else <amp...@example.community.org> will fire. Granted, the To header is cosmetic and does not necessarily hold the actual recipient address. However, since example.com is the OPs domain (so to speak), it is unlikely he'll receive mail with addresses like that. ;) -- 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; }}}