Guido, > I am trying to configure my system that it can assign user specific > scores. I therefore set up a table like described in [1]. This runs fine, > as long as I use spamc to scan mails. > > But actually I want to use Amavisd-new using spamassassin. Here > spamassassin complety ignores the sql settings. Other settings > in the local.cf are threaded correctly. > > - How can I convince spamassassin (used by amavisd-new) to care about my > user_prefs in the database? > > BTW: spamassassin should not try to search for user specific settings in > user's home directorys. Not all all. How can I do that?
There is one fundamental problem which is difficult to overcome: A mail message may have multiple recipients, yet amavisd calls SpamAssassin only once per message. The SA SQL access to scores in principle works, but which username will you specify when there are several??? There is some example code/hack to load SQL user scores when there is exactly one recipient to a message - search for: load_scoreonly and the surrounding commented-out code. A true solution while keeping a one-spam-check-per-message paradigm would require modifying SpamAssassin to allow recomputing scores repeatedly after spam checking, without having to evaluate rules every time. Mark