On Sat, 2011-06-11 at 20:01 +0200, Jezz wrote: > So currently I'm thinking about this plan: I could create a file called > 'zz_sought.cf' and place it into my /rules directory where it's safe. AFAIK > the files in here would be parsed *after* the files inside the > /default_rules directory - at least that would seem logical to me. > > And inside this zz_sought.cf file I can include one line like this: > > include C:\PATH\TO\default_rules\sought_rules_yerp_org.cf > > ...which is pointing to the .cf file from the SOUGHT channel, which itself > contains two 'include' lines pointing to 20_sought.cf and > 20_sought_fraud.cf.
Yes, include directives may be nested. Just tested this. Hey, you could have tested it, too. ;) Also, since your site config is read after the default config, there is no need for the z-prefix. Just have a file named sought.cf including the Sought channel cf, which in turn includes the channel's contents... > Secondly, I now essentially have two files containing 'include' lines which > point to the two SOUGHT .cf files. First (lexically) is > sought_rules_yerp_org.cf. Then comes updates_spamassassin_org.cf which > overwrites the SOUGHT channel entries. Then after that we have my > zz_sought.cf file being parsed last, pointing back to the SOUGHT channel > again. So is there any issue or problem with having two files > (sought_rules_yerp_org.cf and zz_sought.cf) pointing to the two actual > SOUGHT .cf files? I'm guessing not, but I want to make sure. Yes, works. Regardless of using symlinks, a copy of the cf file, or include'ing it from another config file -- the target will be read again. But don't just take my word for it -- see for yourself! spamassassin --lint -D config -- 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; }}}