You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Steven W. Orr" <st...@syslang.net> on 2009/06/24 18:37:24 UTC

I have an SA problem with Thunderbird.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I tried asking this question on the TB forum, but they're tied up with their
own problems right now. I'd like to try here because I frequently get my
problems solved.

Here is what I posted on the TB help forum.

Spamasassin and retraining a false negative

What I really want to do is something that TB doesn't seem to support. i.e., I
and lots of other people want the ability to pipe a message to a program. I
have looked, lots of people have asked for years, and there seems to be no
addon to provide that capability. Ok. Let's see if I can do something close.

I have my own linux home server running sendmail. I have dovecot running to be
my imap server. I have spamassassin and that's hooked up to sendmail via
something called spamass-milter which rejects spam before it even gets
accepted. The system works really well and I have not seen a false positive
for about two years. [I also have clamav-milter running, but that's not really
relevant to this question.]

The bottom line is that spam processing works very well, but even so, I may
get a few false negatives per day. Those that do get through need to be passed
back to the

sa-learn --spam

command. If I don't do this, then there's no way for spamassassin's bayesian
database to learn. So the question I have is this:

Is there a way to shut off all spam filtering that thunderbird might want to
be doing, but at the same time, allow me to click on a message and then click
on the "Junk" button and cause that Junk button to run the sa-learn --spam
command on the message? I did see that there's a file that's a part of my TB
2.0.0.21 installation (under linux) called
/usr/lib/thunderbird-2.0.0.21/isp/SpamAssassin.sfd but its content doesn't
give me any clue.

And if this will generate any sympathy for me, what I'm doing now is to save
each message in a file and then run my program using that new eml file as input.

One last footnote: I do report all the spam that gets through to both spamcop
and knujon, but I do that from the same script that also runs sa-learn.

Anyone want to take a stab at this?

TIA

- --
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkpCVkQACgkQRIVy4fC+NyTDBwCfc4XIEabjHSkf1ub3IiVYQLS0
GN4AmgPMddjKXY9DisQhTTGqpJQWdv4K
=arZi
-----END PGP SIGNATURE-----

Re: I have an SA problem with Thunderbird.

Posted by RW <rw...@googlemail.com>.
On Wed, 24 Jun 2009 19:58:56 +0300
"Jari Fredriksson" <ja...@iki.fi> wrote:


> I do it so, that a cron-job grabs all mail from my confirmed-spam
> folder on server, and learns it and reports to dcc, razor and
> spamcop. It currently does only the report part, but I think it
> learns it as --spam in the same process.
>

That's similar to how I do it, but I think Thunderbird keeps track via
imap keywords. Dovecot encodes these in the filenames, so it should be
straightforwards to read them from a script. 

I don't use Thunderbird, but I've a vague recollection that it can take
it's spam result from SA. I suspect if you play around a bit you should 
be able to drive this all via imap keywords using a server side script.
I'm not convinced it's a better solution though.

Re: I have an SA problem with Thunderbird.

Posted by Jari Fredriksson <ja...@iki.fi>.
> Spamasassin and retraining a false negative
> 
> What I really want to do is something that TB doesn't
> seem to support. i.e., I and lots of other people want
> the ability to pipe a message to a program. I have
> looked, lots of people have asked for years, and there
> seems to be no addon to provide that capability. Ok.
> Let's see if I can do something close.  
> 
> I have my own linux home server running sendmail. I have
> dovecot running to be my imap server. I have spamassassin
> and that's hooked up to sendmail via something called
> spamass-milter which rejects spam before it even gets
> accepted. The system works really well and I have not
> seen a false positive  
> for about two years. [I also have clamav-milter running,
> but that's not really relevant to this question.]
> 
> The bottom line is that spam processing works very well,
> but even so, I may 
> get a few false negatives per day. Those that do get
> through need to be passed back to the
> 
> sa-learn --spam
> 
> command. If I don't do this, then there's no way for
> spamassassin's bayesian database to learn. So the
> question I have is this: 
> 
> Is there a way to shut off all spam filtering that
> thunderbird might want to 
> be doing, but at the same time, allow me to click on a
> message and then click on the "Junk" button and cause
> that Junk button to run the sa-learn --spam command on
> the message? I did see that there's a file that's a part
> of my TB  
> 2.0.0.21 installation (under linux) called
> /usr/lib/thunderbird-2.0.0.21/isp/SpamAssassin.sfd but
> its content doesn't 
> give me any clue.
> 
> And if this will generate any sympathy for me, what I'm
> doing now is to save each message in a file and then run
> my program using that new eml file as input. 
> 
> One last footnote: I do report all the spam that gets
> through to both spamcop and knujon, but I do that from
> the same script that also runs sa-learn. 
> 
> Anyone want to take a stab at this?
> 

I do it so, that a cron-job grabs all mail from my confirmed-spam folder on server, and learns it and reports to dcc, razor and spamcop. It currently does only the report part, but I think it learns it as --spam in the same process.

In my IMAP client, I just drag all the spam to the  confirmed-spam folder, and forget it. Basically I have 2 spam folders, Possible-spam and Confirmed-spam. All getting over 10 points from SA will go to Confirmed-spam, and all between 5-10 go to Possible-spam for a verify.

Works for me.

Re: I have an SA problem with Thunderbird.

Posted by Stefan <st...@localside.net>.
On Wednesday 24 June 2009 22:41:00 Steven W. Orr wrote:
> On 06/24/09 16:15, quoth René Berber:
> > Steven W. Orr wrote:
> >
> > [snip]
> > There is something close: have you seen the Habu plugin?
> >
> > Its used to report spam (to SpamCop for instance), it works by sending
> > anything you marked as spam as attachments in a report.  I don't know if
> > it is open source so changing it, adding the report back to your own
> > program, would be possible.
>
> I saw that but what's missing is the ability to run sa-learn to get the
> retraining to work.
>
> I'm also looking at an alias in sendmail to pipe the message to a script.
> That script can do what I already do, i.e., sa-learn plus the forward
> operation. To accomplish this, I found an addon to TB called Mail Redirect
> that will allow me to "bounce" the message to the alias (instead of
> forwarding it.

You may try sal-wrapper.pl (see: https://po2.uni-stuttgart.de/~rusjako/sal-
wrapper) as the pipe Script. You forward a message as an attachment to the 
alias and the script will unpack the message and feed it to sa-learn. 

Greetings
Stefan

Re: I have an SA problem with Thunderbird.

Posted by "Steven W. Orr" <st...@syslang.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/24/09 16:15, quoth René Berber:
> Steven W. Orr wrote:
> 
> [snip]
>> What I really want to do is something that TB doesn't seem to support. i.e., I
>> and lots of other people want the ability to pipe a message to a program. I
>> have looked, lots of people have asked for years, and there seems to be no
>> addon to provide that capability. Ok. Let's see if I can do something close.
> 
> There is something close: have you seen the Habu plugin?
> 
> Its used to report spam (to SpamCop for instance), it works by sending
> anything you marked as spam as attachments in a report.  I don't know if
> it is open source so changing it, adding the report back to your own
> program, would be possible.

I saw that but what's missing is the ability to run sa-learn to get the
retraining to work.

I'm also looking at an alias in sendmail to pipe the message to a script. That
script can do what I already do, i.e., sa-learn plus the forward operation. To
accomplish this, I found an addon to TB called Mail Redirect that will allow
me to "bounce" the message to the alias (instead of forwarding it.

I also looked at a plugin for dovecot called dovecot-antispam. It looks like
it might be interesting but more complex than the alias.

- --
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkpCj1wACgkQRIVy4fC+NyRasQCcD7BN4xTrLMTXWeL6xL1lK+wT
5CcAn30xmxwvoOY7DUAshC1RWC8rP5nb
=bwVM
-----END PGP SIGNATURE-----

Re: I have an SA problem with Thunderbird.

Posted by René Berber <r....@computer.org>.
Steven W. Orr wrote:

[snip]
> What I really want to do is something that TB doesn't seem to support. i.e., I
> and lots of other people want the ability to pipe a message to a program. I
> have looked, lots of people have asked for years, and there seems to be no
> addon to provide that capability. Ok. Let's see if I can do something close.

There is something close: have you seen the Habu plugin?

Its used to report spam (to SpamCop for instance), it works by sending
anything you marked as spam as attachments in a report.  I don't know if
it is open source so changing it, adding the report back to your own
program, would be possible.
-- 
René Berber


Re: I have an SA problem with Thunderbird.

Posted by Lee <uk...@btinternet.com>.
Steven W. Orr wrote:
> Is there a way to shut off all spam filtering that thunderbird might want to
> be doing, but at the same time, allow me to click on a message and then click
> on the "Junk" button and cause that Junk button to run the sa-learn --spam
> command on the message?
That's a nice idea; if TB buttons can't easily be customised, maybe you 
could make your own TB button to run such a command/script. I don't know 
however if buttons can do such things.

All I know about TB's junk and SA filtering related to your question, is 
basic stuff which presumably you're well aware of; I may as well offer 
it in case it enlightens less advanced users like me, then I'll get back 
in my box ...
You can turn off all TB's adaptive junk filtering/detection by unticking 
the option in Account Settings, Junk Settings.
Those same settings have an option 'Trust junk mail headers set by 
SpamAssassin', which I _assume_ is the equivalent of manually making a 
filter to act on the header X-Spam-Status if present. I haven't tried it 
... maybe I should! (I made my own filter looking for X-Spam-Status: Yes).

Lee