On Fri, 2013-11-08 at 14:45 -0700, Amir 'CG' Caspi wrote: > On Fri, November 8, 2013 2:39 pm, Sergio Durigan Junior wrote: > > I don't think sa-learn can help with spamd. Its own manpage mention > > that, for spamd users, "spamc -L" is the way to go.
Fundamentally, there is no difference between sa-learn and spamc -L. > > Hm, really? I thought spamd kept a global Bayes database, and that > > everyone calling "spamc -L" would end up feeding this database, and not > > some local one. > > It depends on how spamc is called. If spamd is running as root and spamc > is called with the -u flag, then spamd will su to the named user, and will > then use that user's local database (and local prefs, if allow_user_prefs > is enabled). spamc -L -u would work on the local database; spamc -L > (without -u) would work on the database applicable to the spamd user. The latter is incorrect -- spamc by default sends the effective user ID, and spamd switches users before processing the mail (assuming the daemon has been started as root). The -u user option is only necessary to change that default. -- 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; }}}