After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 368851 - Junk only works once
Junk only works once
Status: RESOLVED NOTABUG
Product: evolution
Classification: Applications
Component: Mailer
2.8.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2006-11-01 13:31 UTC by Brian J. Murrell
Modified: 2006-11-08 16:32 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Brian J. Murrell 2006-11-01 13:31:50 UTC
Please describe the problem:
Hitting the Junk button only actaully calls sa-learn once after a fresh evolution start.  I see that it is calling sa-learn with a --version argument.  Any subsequent use of the Junk button merely tags the message as junk (i.e. moves it to the Junk vFolder) but does not pass the message to sa-learn.

Presumably there is something about that --version probe that is causing evo unhappiness about sa-learn and it is simply not trying any more.

What conditions would cause this?

Steps to reproduce:
Probably...
1. create a shell script sa-learn that simply logs it's called parameters and put it in $PATH before any other sa-learn
2. hit junk on a message
3. hit junk on a subsequent message
4. check the log

Actual results:
only the first sa-learn will log a message

Expected results:
each sa-learn should log a message that it was called

Does this happen every time?
yes

Other information:
Comment 1 Brian J. Murrell 2006-11-08 16:32:13 UTC
OK.  A look through the source for the sa junk plugin reveals the problem.  There is a call to "spamassassin --version" used in trying to verify the presence of spamassassin and if it fails, no further calls to spamassassin are made.

So, if like me, you have a customized, non-spamassassin supplied sa-learn command, and no "spamassassin" command your sa-learn command will not be executed.

My custom "sa-learn" simply passes my ham/spam to an sa-learn process on the mail server (i.e. cat $spam | ssh $mailserver sa-learn $args) where my spamassassin installation really lives and since I had already discovered that the sa junk plugin wants to call sa-learn --version, it sufficed to replace "sa-learn" in the script with $(basename $0) and hard link my sa-learn to spamassassin.

Now all is working again.

Perhaps, as a result of all of this, what is needed is a very configurable generic junk plugin.  It would probably need to have "initialize", "submit ham", "submit spam", and "sync" commands configurable.  Being able to use it with spamassassin's sa-learn would be a good test for it given sa's need to have a "sync" operation after the submit ham/spam operations.

In any case, this actual bug can be closed.