Bug 264 - allow_user_rules broken
Summary: allow_user_rules broken
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamc/spamd (show other bugs)
Version: 2.20
Hardware: Macintosh other
: P2 normal
Target Milestone: ---
Assignee: Craig Hughes
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-29 09:25 UTC by Brian Kendig
Modified: 2002-08-23 03:32 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
Big patch. patch None Duncan Findlay [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Kendig 2002-04-29 09:25:35 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.
Comment 1 Duncan Findlay 2002-06-01 19:48:15 UTC
Reporter, did you restart spamd?
Comment 2 Duncan Findlay 2002-06-01 20:02:18 UTC
Never mind... I am reproducing this.
Will look some more...
Comment 3 Duncan Findlay 2002-06-01 21:28:37 UTC
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.
Comment 4 Duncan Findlay 2002-06-01 21:29:45 UTC
Created attachment 138 [details]
Big patch.
Comment 5 Duncan Findlay 2002-06-01 21:30:10 UTC
Here you go craig.
Comment 6 Craig Hughes 2002-06-01 23:40:36 UTC
Thanks duncan -- patch committed.  Next time please use diff -u though.
Comment 7 Brian Kendig 2002-06-09 06:59:36 UTC
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.

Comment 8 Craig Hughes 2002-06-09 23:01:26 UTC
Just checked in a fix on a dupe

*** This bug has been marked as a duplicate of 207 ***
Comment 9 Brian Kendig 2002-06-15 15:19:48 UTC
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.

Comment 10 Brian Kendig 2002-06-15 16:23:29 UTC
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.

Comment 11 Brian Kendig 2002-06-17 09:57:17 UTC
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?

Comment 12 Craig Hughes 2002-06-17 13:15:34 UTC
Are you using the

allow_user_rules 1

setting in local.cf?
Comment 13 Brian Kendig 2002-06-17 14:47:48 UTC
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

Comment 14 Justin Mason 2002-08-13 16:04:34 UTC
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.
Comment 15 Craig Hughes 2002-08-23 02:52:43 UTC
Brian, is this still broken for you?  I'd like to close the bug out if it's
resolved in 2.40
Comment 16 Brian Kendig 2002-08-23 09:21:23 UTC
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.

Comment 17 Craig Hughes 2002-08-23 11:32:51 UTC
Ok, closing then.