You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Chris Frederick <cd...@cdf123.net> on 2004/10/15 00:32:42 UTC

subject_tag and _AUTOLEARN_ not working?

Hi everyone,

I have these two lines in my .spamassassin/user_prefs file:

rewrite_subject 1
subject_tag [ Spam: _HITS_  Auto Learn: _AUTOLEARN_ ]

But when it's actually run it ends up like this:

$ cat .maildir/.Junk/cur/1097701214 | spamc
<snip>
Subject: [ Spam: 05.14  Auto Learn: _AUTOLEARN_ ] ...
<snip>

Is there any reason that the _AUTOLEARN_ tag isn't getting replaced with 
"no", "ham", or "spam"?  Or is there something with my distribution's 
setup that's causing this?

Thanks all

Chris Frederick


Re: subject_tag and _AUTOLEARN_ not working?

Posted by Chris Frederick <cd...@cdf123.net>.
Matt Kettler wrote:
> At 08:12 PM 10/15/2004, Chris Frederick wrote:
> 
>> SA version is 2.63.  And I tried setting report_safe to 0, 1, and 2 
>> and nothing changed.  I changed it in /etc/mail/spamassassin/local.cf 
>> and my ~/.spamassassin/user_prefs, even restarting the daemon between 
>> changes (not sure if it was needed but wanted to be sure).
>> man Mail::SpamAssassin::Conf mentioned that report_safe needs to be 
>> used for anything beyond _HITS_ and _REQD_ tags, but I didn't see 
>> anything else that would be a requirement.  The output from spamc 
>> shows that report_safe seems to be set to 1, but as I said, if I 
>> change it to 0, 1, or 2, it still adds the original message as an 
>> attachment.
> 
> 
> If changing report_safe to 0 doesn't stop SA from encapsulating messages 
> you have one of the following problems:
> 
>         1) you forgot to restart spamd (you have to do that any time you 
> change local.cf)
>         2) you have a typo in your file and forgot to run spamassassin 
> --lint
>         3) you edited a different local.cf than SA is using, check 
> spamassassin -D --lint to see where the "site rules" dir is.
>         4) you're using an integration tool like mailscanner that does 
> it's own encapsulation, regardless of how SA is set up.

Still no go...  :(

I restarted spamd on every change to /etc/mail/spamassassin/local.cf.  I 
also checked the /usr/share/spamassassin for the report_safe setting, 
and commented that one out completely, and now the report_safe changes 
are showing up.  But, nothing I do changes the _AUTOLEARN_ tag.  All 
three settings show the subject the same, _HITS_ gets replaced with the 
score, and _AUTOLEARN_ doesn't get changed at all.

As far as having an integration tool, all I have is the standard postfix 
install using procmail for local delivery.  So SA is only used via my 
~/.procmailrc configs.

I'm starting to think it might be better to just do a manual update to 
3.0, I was going to wait a while for an official rpm from Mandrake to 
show up, but I might be better off going to 3.0 now.

SA relevant ~/.procmailrc config lines:

:0 fw : $ASSASSINLOCK
| spamc

:0
* ^X-Spam-Flag: YES
$JUNKMAIL

Here's the output from spamassassin --lint -D:

$ spamassassin --lint -D
debug: Score set 0 chosen.
debug: running in taint mode? yes
debug: Running in taint mode, removing unsafe env vars, and resetting PATH
debug: PATH included '/usr/local/bin', keeping.
debug: PATH included '/bin', keeping.
debug: PATH included '/usr/bin', keeping.
debug: PATH included '/usr/X11R6/bin', keeping.
debug: PATH included '/usr/games', keeping.
debug: PATH included '/home/cdf123/bin', keeping.
debug: Final PATH set to: 
/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/home/cdf123/bin
debug: ignore: using a test message to lint rules
debug: using "/usr/share/spamassassin" for default rules dir
debug: using "/etc/mail/spamassassin" for site rules dir
debug: using "/home/cdf123/.spamassassin" for user state dir
debug: using "/home/cdf123/.spamassassin/user_prefs" for user prefs file
debug: using "/home/cdf123/.spamassassin" for user state dir
debug: bayes: 20558 tie-ing to DB file R/O 
/home/cdf123/.spamassassin/bayes_toks
debug: bayes: 20558 tie-ing to DB file R/O 
/home/cdf123/.spamassassin/bayes_seen
debug: bayes: found bayes db version 2
debug: bayes: Not available for scanning, only 120 spam(s) in Bayes DB < 200
debug: bayes: 20558 untie-ing
debug: bayes: 20558 untie-ing db_toks
debug: bayes: 20558 untie-ing db_seen
debug: Score set 1 chosen.
debug: Initialising learner
debug: using "/home/cdf123/.spamassassin" for user state dir
debug: bayes: 20558 tie-ing to DB file R/O 
/home/cdf123/.spamassassin/bayes_toks
debug: bayes: 20558 tie-ing to DB file R/O 
/home/cdf123/.spamassassin/bayes_seen
debug: bayes: found bayes db version 2
debug: bayes: Not available for scanning, only 120 spam(s) in Bayes DB < 200
debug: bayes: 20558 untie-ing
debug: bayes: 20558 untie-ing db_toks
debug: bayes: 20558 untie-ing db_seen
debug: dns_available set to no in config file, skipping test
debug: running header regexp tests; score so far=0
debug: running body-text per-line regexp tests; score so far=1.27
debug: Razor2 is not available
debug: running raw-body-text per-line regexp tests; score so far=1.27
debug: running uri tests; score so far=1.27
debug: uri tests: Done uriRE
debug: running full-text regexp tests; score so far=1.27
debug: Razor2 is not available
debug: DCCifd is not available: no r/w dccifd socket found.
debug: all '*From' addrs: ignore@compiling.spamassassin.taint.org
debug: all '*To' addrs:
debug: running meta tests; score so far=1.27
debug: is spam? score=1.27 required=4.5 tests=DATE_MISSING,NO_REAL_NAME

Is there anything else I can check?

Chris Frederick


Re: subject_tag and _AUTOLEARN_ not working?

Posted by Matt Kettler <mk...@evi-inc.com>.
At 08:12 PM 10/15/2004, Chris Frederick wrote:
>SA version is 2.63.  And I tried setting report_safe to 0, 1, and 2 and 
>nothing changed.  I changed it in /etc/mail/spamassassin/local.cf and my 
>~/.spamassassin/user_prefs, even restarting the daemon between changes 
>(not sure if it was needed but wanted to be sure).
>man Mail::SpamAssassin::Conf mentioned that report_safe needs to be used 
>for anything beyond _HITS_ and _REQD_ tags, but I didn't see anything else 
>that would be a requirement.  The output from spamc shows that report_safe 
>seems to be set to 1, but as I said, if I change it to 0, 1, or 2, it 
>still adds the original message as an attachment.

If changing report_safe to 0 doesn't stop SA from encapsulating messages 
you have one of the following problems:

         1) you forgot to restart spamd (you have to do that any time you 
change local.cf)
         2) you have a typo in your file and forgot to run spamassassin --lint
         3) you edited a different local.cf than SA is using, check 
spamassassin -D --lint to see where the "site rules" dir is.
         4) you're using an integration tool like mailscanner that does 
it's own encapsulation, regardless of how SA is set up. 


Re: subject_tag and _AUTOLEARN_ not working?

Posted by Chris Frederick <cd...@cdf123.net>.
Matt Kettler wrote:

> At 06:44 PM 10/14/2004, Matt Kettler wrote:
>
>> >Is there any reason that the _AUTOLEARN_ tag isn't getting replaced 
>> with "no", "ham", or "spam"?  Or is there something with my 
>> distribution's setup that's causing this?
>>
>> If report_safe is not set to 0, SA won't do that, it will only honor 
>> _SCORE_ and _REQD_.
>>
>> Read the documentation for rewrite_header in man 
>> Mail::SpamAssassin::Conf.
>
>
> Self correction, I was quoting documentation for SA 3.0, and you're 
> apparently using 2.6x. (In the future, when asking config questions 
> please specify what version of SA you're running, particularly if it's 
> not the latest)
>
> In any event, read the documentation for subject_tag in man 
> Mail::SpamAssassin::Conf if you're using 2.6x. It works much like 3.0, 
> however, the docs seem to read the reverse, claiming you can only use 
> SCORE and REQD unless report_safe is used. I suspect this is a typo, 
> and it means unless report_safe 0 is used.

Ok, got some more info.

SA version is 2.63.  And I tried setting report_safe to 0, 1, and 2 and 
nothing changed.  I changed it in /etc/mail/spamassassin/local.cf and my 
~/.spamassassin/user_prefs, even restarting the daemon between changes 
(not sure if it was needed but wanted to be sure). 

man Mail::SpamAssassin::Conf mentioned that report_safe needs to be used 
for anything beyond _HITS_ and _REQD_ tags, but I didn't see anything 
else that would be a requirement.  The output from spamc shows that 
report_safe seems to be set to 1, but as I said, if I change it to 0, 1, 
or 2, it still adds the original message as an attachment.

Are there any other config files that spamassassin uses that might be 
overwritting my settings?  Is there anything else that I can add to help?

Thanks all,

Chris Frederick

Re: subject_tag and _AUTOLEARN_ not working?

Posted by Matt Kettler <mk...@evi-inc.com>.
At 06:44 PM 10/14/2004, Matt Kettler wrote:
> >Is there any reason that the _AUTOLEARN_ tag isn't getting replaced with 
> "no", "ham", or "spam"?  Or is there something with my distribution's 
> setup that's causing this?
>
>If report_safe is not set to 0, SA won't do that, it will only honor 
>_SCORE_ and _REQD_.
>
>Read the documentation for rewrite_header in man Mail::SpamAssassin::Conf.

Self correction, I was quoting documentation for SA 3.0, and you're 
apparently using 2.6x. (In the future, when asking config questions please 
specify what version of SA you're running, particularly if it's not the latest)

In any event, read the documentation for subject_tag in man 
Mail::SpamAssassin::Conf if you're using 2.6x. It works much like 3.0, 
however, the docs seem to read the reverse, claiming you can only use SCORE 
and REQD unless report_safe is used. I suspect this is a typo, and it means 
unless report_safe 0 is used. 


Re: subject_tag and _AUTOLEARN_ not working?

Posted by Matt Kettler <mk...@evi-inc.com>.
At 06:32 PM 10/14/2004, Chris Frederick wrote:
>Hi everyone,
>
>I have these two lines in my .spamassassin/user_prefs file:
>
>rewrite_subject 1
>subject_tag [ Spam: _HITS_  Auto Learn: _AUTOLEARN_ ]
>
>But when it's actually run it ends up like this:
>
>$ cat .maildir/.Junk/cur/1097701214 | spamc
><snip>
>Subject: [ Spam: 05.14  Auto Learn: _AUTOLEARN_ ] ...
><snip>
>
>Is there any reason that the _AUTOLEARN_ tag isn't getting replaced with 
>"no", "ham", or "spam"?  Or is there something with my distribution's 
>setup that's causing this?

If report_safe is not set to 0, SA won't do that, it will only honor 
_SCORE_ and _REQD_.

Read the documentation for rewrite_header in man Mail::SpamAssassin::Conf.