Ticket #9 (closed enhancement: fixed)

Opened 18 months ago

Last modified 17 months ago

spamassassin - learning spam/ham

Reported by: sven Owned by: jonas
Priority: minor Milestone:
Component: webinterface Version: SVN
Keywords: Cc:

Description

it would be nice if one could train spamassassin for spam and ham. This could be done by selecting an imap folder for spam and one for ham (if available). Than a script could execute (e.g. once a day)

sa-learn --spam /tmp/your_spambox sa-learn --ham /tmp/your_hambox

Attachments

Ham_Spam.jpg (42.4 kB) - added by sven 17 months ago.
Learning Spam Ham Form

Change History

Changed 18 months ago by jonas

  • status changed from new to assigned

You mean every user should set folders to ham/spam training list, or the admin and superadmin?

I think this feature is good, but interface should not allow to learn INBOX as ham or spam, because this will train spamassassin /bogofilter with false-positives.

What do you think?

Changed 18 months ago by sven

Every user should have its own IMAP folder (which have to generate by hand), e.g. "Learn Ham" and "Learn Spam". Each false-positives mail should than be copied or moved (inside your email reader, by hand) to "Learn Ham" and each unmarked mail, which is spam, to "Learn Spam".

To configure the folders inside the webinterface, this could be done like the "Verschiebe erkannten Spam nach:" feature - e.g. "Train spammassassin with ham from this folder:"... After learning the folders have to be deleted or automatically move to another folder.

Changed 18 months ago by jonas

Please have a look at the current SVN version. exper. spam/ham learning support

Changed 18 months ago by sven

wow, fast implementation! Your solution offers the posibility to set this option for each imap-OrdNer? (see this misspelling ;-)) This is also nice, but maybe it is more clearly, if you offer the user to select one folder for "learn ham" and one for "learn spam" - the imap-folders come from a select-box. And than there are your "learn active" flags for each setting. This could be enough! But that's a matter of opinion.

Do you already have a script idea/solution to test?

Changed 18 months ago by jonas

Please have an look at r130. No I don't have any backendscript for this feature, I will do it next week. I have the plan to learn only mails that are between 2 and 5 days old. So it learns only new mails.

Changed 17 months ago by sven

Learning Spam Ham Form

Changed 17 months ago by sven

Attached you find my proposal for this form (the folder selection comes from the drop down)

Why not training spamassassin with mails that are between now and 5 days. If CpVES do so, one could delete old mails form each folder every day (which are from yesterday and older).

Changed 17 months ago by jonas

hm.... so you want to specify an single folder for learning spam and ham. And the backendscript should learn the mails and than delete the mails...

*But* this will delete mails and some stupid user move AND NOT COPY ham into the "ham learning folder", so this will delete mails.

I don't how if this is a good solution, but perhaps we could insert both features to CpvES.

Changed 17 months ago by sven

yes and no!

yes: specifying one single for spam and one for ham (keep it simple)
no: deleting not automatically, only by hand! (but i think the user wants to delete it by hand the next day and not after 2 day as you suggested)

Changed 17 months ago by jonas

  • status changed from assigned to closed
  • resolution set to fixed

Please have a look at r147. It's now done.

run sa_learn.pl as root every night.

Note: See TracTickets for help on using tickets.