On Sat, 2009-06-27 at 16:56 +0930, Cory Hawkless wrote: > Been doing some reading on RegEx and even coming from a programming > background it is a bit intimidating, my problem is I haven’t been able > to find a good source of information on exactly what\how SpamAssassin > matches the RegEx rules when scanning
Depends on the rule type you use. See the Rule Definitions section in the docs [1] and the Rule Writing intro guide [2] in the wiki. Between header, uri, body, and the other body rules, the scope of matching varies significantly. The type of rule also may have an impact on how the data is rendered (or not). > and what variant of RegEx is being used?(I.E what syntax is and is not > allowed?) Perl Regular Expressions. The perlre [3] docs are quite heavy and best used as a comprehensive reference, though. For some gentle introduction and a longer tutorial, see the links in the Description section of [3]. > I’d like to be able to make my own simple rules but it’s proving quite > difficult, Maybe a tool that I can use the build Regular Expressions > would help? > > I’m sure there are PELNTY of other out ther that are rather bamboozled > by this also and would benefit greatly from any assistance. Besides writing your own custom rules -- this list is a good source for general advice, and ready-made rules targeting new spammer patterns. I suggest checking the (recent-ish) archives and lurking on list. You can learn and catch a great lot by that. guenther [1] http://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Conf.html [2] http://wiki.apache.org/spamassassin/WritingRules [3] http://perldoc.perl.org/perlre.html -- 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; }}}