SA Bugzilla – Bug 264
allow_user_rules broken
Last modified: 2002-08-23 03:32:51 UTC
spamd is not using the custom rules I've set up in my user_prefs file. I've verified that the 'allow_user_rules 1' line is in local.cf, that my custom rule is in '~/.spamassassin/user_prefs', that I'm receiving email which should trigger my custom rule but isn't, and that it *does* work if I use spamassassin instead of spamd/spamc. Other settings in user_prefs, such as 'use_terse_report 1', are being obeyed. spamd is running with my own userid (it's not running as root), and local.cf and user_prefs are both readable by my userid.
Reporter, did you restart spamd?
Never mind... I am reproducing this. Will look some more...
D'oh! allow_user_rules never actually did work. I just assumed it did. :-( I failed to realise that if tests are already compiled, spamassassin won't recompile. It doesn't realise that they may be new tests. (or I forgot to make it realise that) Anyways, I fixed it.
Created attachment 138 [details] Big patch.
Here you go craig.
Thanks duncan -- patch committed. Next time please use diff -u though.
It still doesn't work. - I installed the latest 2.21 as of today (June 9) - I'm using spamd/spamc - 'allow_user_rules 1' line is in local.cf - this custom rule is in '~/.spamassassin/user_prefs': header OLD_ADDRESS_1 Delivered-To =~ /bskendig\@enchanter\.net/i describe OLD_ADDRESS_1 Sent to old address 'bskendig@enchanter.net' score OLD_ADDRESS_1 9.9 I sent email to 'bskendig@enchanter.net' and it got through okay without being flagged by SpamAssassin.
Just checked in a fix on a dupe *** This bug has been marked as a duplicate of 207 ***
In SpamAssassin 2.30, spamd is still ignoring the custom rules I've set up in my user_prefs file. It's not scoring incoming email with my rules when the rules apply to it. If I simply move the header/describe/score lines from user_prefs into local.cf and restart spamd, then the rules are applied properly.
Never mind -- it only seems to miss applying the custom rules to some email, but it gets others, not sure why. Because it works sometimes, I'll close this bug until I can pinpoint the problem further.
Actually, I am going to reopen this bug. With the same configuration as I gave above, and the same custom rule as I gave above, spamd/spamc 2.30 is only intermittently applying the rules. One of my custom rules is: header OLD_ADDRESS_2 Delivered-To =~ /brian-usenet\@enchanter\.net/i describe OLD_ADDRESS_2 Sent to old address 'brian-usenet@enchanter.net' score OLD_ADDRESS_2 9.9 And I just received email with these headers: Delivered-To: brian-usenet@enchanter.net X-Spam-Status: No, hits=2.9 required=5.0 tests=X_NOT_PRESENT,NO_REAL_NAME,NONEXISTENT_CHARSET, INVALID_DATE,PLING,NO_COST,LINES_OF_YELLING, LINES_OF_YELLING_2,FROM_AND_TO_SAME,DATE_IN_PAST_96_XX version=2.30 Note that it didn't apply the custom rule. I sent a test email to 'brian-usenet@enchanter.net' and it got through without being caught by the rule. I killed and restarted spamd and sent another test email to the same address, and it also got through. This might not be happening all the time; it seems that occasionally my custom rules are being applied to some incoming email?
Are you using the allow_user_rules 1 setting in local.cf?
Yup. % more /etc/mail/spamassassin/local.cf # Add your own customisations to this file. See 'man Mail::SpamAssassin::Conf' # for details of what can be tweaked. allow_user_rules 1
BTW, strikes me that spamd may occasionally not be reading user_prefs, this seems to have been reported in other bugs. If this is the case, this bug is probably a dupe of those. Needs more investigation anyway.
Brian, is this still broken for you? I'd like to close the bug out if it's resolved in 2.40
I'm using 2.31, and the bug hasn't reared its head in many months, so I think things look good. If I find otherwise and can pin down any more specific info, I'll add it here.
Ok, closing then.