You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by James Bucanek <su...@gloaming.com> on 2005/07/27 07:55:39 UTC

Correct use of 'spamassassin --report'?

Greetings again,

I just upgraded my SA system and installed Razor.

I have two e-mail addresses set up for spam and ham reporting. Both are sent to an mbox that is, twice an hour, shipped off to a script that runs sa-learn.

When I installed Razor I modified the script to send the same messages to razor-report too.

Later, I read that one shouldn't do that because it sends Razor the messages with the SpamAssassin headers. One should use 'spamassassin --report' instead. This is supposed to update the Bayes DB, strip the SA headers, and report it to Razor sans headers all with a single command. Apparently, I'm not doing it right.

But when I run 'spamassassin --debug --report --mbox < queued_spam.mbox' I get a bunch of suspicious messages, which makes me think it isn't working right at all:

debug: SpamAssassin version 3.0.4
<clip>
debug: Removing Markup
<clip>
debug: bayes: found bayes db version 3
debug: Score set 3 chosen.
debug: Learning Spam
debug: all '*From' addrs: subscriber@gloaming.com
debug: all '*To' addrs: spam_bucket@twilightandbarking.com
debug: Not using Bayes, bayes_ignore_from or _to rule
debug: Removing Markup
<clip>
debug: Razor2 is available
<clip>
debug: SpamAssassin: spam reported to Razor.
Use of uninitialized value in concatenation (.) or string at ///Library/Perl/5.8.1/Mail/SpamAssassin/Reporter.pm line 435.
Use of uninitialized value in concatenation (.) or string at ///Library/Perl/5.8.1/Mail/SpamAssassin/Reporter.pm line 435.
Insecure dependency in connect while running with -T switch at /System/Library/Perl/5.8.1/darwin-thread-multi-2level/IO/Socket.pm line 114.
1 message(s) examined.
spam.mbox processed Tue Jul 26 16:07:02 MST 2005

The first message that really worries me is "Not using Bayes, bayes_ignore_from or _to rule."

I have an ignore_to rule for my "learn spam" address. If I'm reading this right, it looks like SA is going to ignore the message and not update the Bayes DB because it matches this rule. This, of course, completely defeats the purpose since all of the mail sent to the "learn spam" mailbox will have this address.

Also, it only reports one From: address, and the message at the end of the output is always "1 message(s) examined" regardless of how many messages are in the mbox. I can only assume that spamassassin it's reading the file as an mbox and is treating the whole thing as a single message.

And finally, those "uninitialized value" and "Insecure dependency" messages just look bad.

Can someone confirm this?

What's the correct way to update the Bayes and report spam to Razor using a spam-reporting mailbox?

TIA,

James
-- 
James Bucanek <ma...@gloaming.com>

Re: Correct use of 'spamassassin --report'?

Posted by James Bucanek <su...@gloaming.com>.
Matt Kettler wrote on Wednesday, July 27, 2005:

>At 01:55 AM 7/27/2005, James Bucanek wrote:
>>I just upgraded my SA system and installed Razor.
>>
>>I have two e-mail addresses set up for spam and ham reporting. Both are 
>>sent to an mbox that is, twice an hour, shipped off to a script that runs 
>>sa-learn.
>>
>>When I installed Razor I modified the script to send the same messages to 
>>razor-report too.
>>
>>Later, I read that one shouldn't do that because it sends Razor the 
>>messages with the SpamAssassin headers. One should use 'spamassassin 
>>--report' instead.
>
>If your spamassassin markup is headers-only it's fine. Razor does NOT care 
>about headers at all.
>
>However, if you're using sa in a way that encapsulates spam, then you'll 
>want to use spamassassin --report.

No, I'm not encapsulating the spam. I've written some scripts which redirect the messages, unchanged, to the spam/ham reporting address.

So it look like I can just go back to using sa-learn and razor-report.

Thanks.

>
>>This is supposed to update the Bayes DB, strip the SA headers, and report 
>>it to Razor sans headers all with a single command. Apparently, I'm not 
>>doing it right.
>>
>>But when I run 'spamassassin --debug --report --mbox < queued_spam.mbox' I 
>>get a bunch of suspicious messages, which makes me think it isn't working 
>>right at all:
>
>Of course it isn't. spamassassin does not support --mbox, only sa-learn does.
>
>spamassassin only accepts single-message rfc-822 format.  

Then what does the --mbox switch do?

    twilightandbarking:~ james$ spamassassin --help
    SpamAssassin version 3.0.4
      running on Perl version 5.8.1
    
    For more information read the spamassassin man page.
    
    Usage:
        spamassassin [options] [ < *mailmessage* | *path* ... ]
    
        spamassassin -d [ < *mailmessage* | *path* ... ]
    
        spamassassin -r [ < *mailmessage* | *path* ... ]
    
        spamassassin -k [ < *mailmessage* | *path* ... ]
    
        spamassassin -W|-R [ < *mailmessage* | *path* ... ]
    
        Options:

<clip>  
         --mbox                            read in messages in mbox format
         --mbx                             read in messages in UW mbx format
<clip>
         -D, --debug [area=n,...]          Print debugging messages
         -V, --version                     Print version
         -h, --help                        Print usage message

-- 
James Bucanek <ma...@gloaming.com>

Re: Correct use of 'spamassassin --report'?

Posted by Matt Kettler <mk...@comcast.net>.
At 01:55 AM 7/27/2005, James Bucanek wrote:
>I just upgraded my SA system and installed Razor.
>
>I have two e-mail addresses set up for spam and ham reporting. Both are 
>sent to an mbox that is, twice an hour, shipped off to a script that runs 
>sa-learn.
>
>When I installed Razor I modified the script to send the same messages to 
>razor-report too.
>
>Later, I read that one shouldn't do that because it sends Razor the 
>messages with the SpamAssassin headers. One should use 'spamassassin 
>--report' instead.

If your spamassassin markup is headers-only it's fine. Razor does NOT care 
about headers at all.

However, if you're using sa in a way that encapsulates spam, then you'll 
want to use spamassassin --report.


>This is supposed to update the Bayes DB, strip the SA headers, and report 
>it to Razor sans headers all with a single command. Apparently, I'm not 
>doing it right.
>
>But when I run 'spamassassin --debug --report --mbox < queued_spam.mbox' I 
>get a bunch of suspicious messages, which makes me think it isn't working 
>right at all:

Of course it isn't. spamassassin does not support --mbox, only sa-learn does.

spamassassin only accepts single-message rfc-822 format.