On Thu, 25 Sep 2008, slaterm61 wrote:

Each users spam preferences are stored in a mysql table and everything is working pretty well, except that people with the "required_score" option set to a high level.. e.g 99 are still having spam filtered with the option in .procmailrc * ^X-Spam-Level: \*\*\*\*\*\* .

This is because procmail has no idea what the user's threshold is set to in the database.

:0:
* ^X-Spam-Level: \*\*\*\*\*\*
#sa-learn --spam
#/dev/null
mail/Spam

Don't do that. That's enforcing a "spam at 6+ points" delivery rule regardless of the user's individual threshold settings.

:0:
* ^X-Spam-Status: Yes
mail/Spam

That rule is the only one you should have.

What is the best way to offer people reliable opt-in and opt out from spamassassin ?

A better method would be to have procmail check whether the user has opted out before attempting to pass the message to SA for scoring, and skipping all that processing if they have. There are several ways you could do this, ranging from running a mysql query to look at the user's threshold score (bad idea) to looking for the user's username in an opt-out file somewhere or checking whether the user has created an opt-out file in their home directory (which of course depends on the users having home directories...)

--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 [EMAIL PROTECTED]    FALaholic #11174     pgpk -a [EMAIL PROTECTED]
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
 Those in the media have donated to Obama at a 100:1 ratio compared
 to McCain. Are we to believe that this bias does not in any way
 taint their coverage of the campaign?
-----------------------------------------------------------------------
 39 days until the Presidential Election

Reply via email to