> > > Hi, I am using spamassassin and store the user preferences in > an SQL database. > That works for simple options, like required_hits, since this > has a key (required_hits) and a value (5.0 for example). > But how about preferences where the key is composed of > multiple parts, like rewrite_header subject? I stored this as > one string in the column 'preference' and the value > (****SPAM****) in the column 'value', but it is ignored. How > do I have to give such preferences? >
This is how I do it, and it works fine. mysql> select username,preference,value from sa_rules where preference like 'rewrite_header%' OR preference like 'score%' ORDER BY username; +---------------------+-------------------------+----------------+ | username | preference | value | +---------------------+-------------------------+----------------+ | $GLOBAL | score USER_IN_WHITELIST | -100 | | $GLOBAL | score USER_IN_BLACKLIST | 100 | | $GLOBAL | rewrite_header Subject | [SPAM-_HITS_]- | | $GLOBAL | score ALL_TRUSTED | 0 | | %nmgi.com | score USER_IN_BLACKLIST | 15 | | %nmgi.com | rewrite_header Subject | [SPAM-_HITS_]- | | %nmgi.com | score USER_IN_WHITELIST | -15 | | [EMAIL PROTECTED] | score USER_IN_WHITELIST | -10 | | [EMAIL PROTECTED] | score USER_IN_BLACKLIST | 10 | | [EMAIL PROTECTED] | rewrite_header Subject | [SPAM] _HITS_ | +---------------------+-------------------------+----------------+ D