Roundcube Community Forum

 

Mark as Junk 2

Started by kirisame, September 16, 2010, 03:34:08 PM

Previous topic - Next topic

kirisame

Ok I've been using this pluign for a period and I realize without 3rd parties detectors (such as SpamAssassin) I can't really do anything about those spam messages since it doesn't even learn anything.

I hope someone can edit this plugin and develope a build-in function that can automatically adds the sender of the SPAM into blacklists and automatically move all the messages from that sender into the SPAM folder further on, that way when that sender send something to me again, it will automatically be in the spam folder.

That way I don't have to manually move those SPAM messages into the SPAM folder, which is really stupid since it is not learning anything.

BTW I am a Win 2008 r2 user, so installing SA on my system is a bit complicated, thats why I decided not to do so cuz I am a noob on these.

SKaero

Automatic moving of emails has to be done by the IMAP server, otherwise there would be a large overhead to filter the email every time you open RoundCube.

stkcode

#2
This plugin is meant to feed false positive/false negative messages to a third-party program for learning via command line, email address or directory.

Blacklisting every sender manually that sends you spam is extremely ineffective and time consuming.  Consider installing spamassassin, sauserprefs, and using this plugin with spamassassin's bayes enabled.  Then, as already mentioned, use the imap server's facilities to move the messages.

kirisame

Quote from: stkcode;30066This plugin is meant to feed false positive/false negative messages to a third-party program for learning via command line, email address or directory.

Blacklisting every sender manually that sends you spam is extremely ineffective and time consuming.  Consider installing spamassassin, sauserprefs, and using this plugin with spamassassin's bayes enabled.  Then, as already mentioned, use the imap server's facilities to move the messages.

I m using hmailserver, how do I do that under my IMAP server?

stkcode

#4
Read hmailserver's documentation:  Rule

ZeroEnna

#5
Sorry to jump on this train instead of opening a new thread, but:

I want to use MAJ2 to simplify my Spam learning process.
First of all Setup:

I use RC together with a Postfix/Courier combination. For administration I use ISPConfig. I have several different sites and domains hosted, so there is no "folder" the different mail boxes have in common. Each one has it's own ham and spam folder.

So actually I want to use a batch script for sa-learn, which processes like this pattern:

sa-learn --showdots --spam /var/vmail/example/info/.Junk/
sa-learn --showdots --spam /var/vmail/example/postmaster/.Junk/
sa-learn --showdots --spam /var/vmail/bar/foo/.Junk/
[...]

sa-learn --showdots --ham /var/vmail/example/info/cur/
sa-learn --showdots --ham /var/vmail/example/postmaster/cur/
sa-learn --showdots --ham /var/vmail/bar/foo/cur/
[...]

So basically all spam is to be stored in .Junk, all ham is to be stored in cur.
So what parameter do

$rcmail_config['markasjunk2_spam_dir'] and $rcmail_config['markasjunk2_ham_dir']

need to get as a general pattern. I tried for example

$rcmail_config['markasjunk2_spam_dir'] = "/var/vmail/%d/%l/.Junk/";

but the mail doesn't move. I even added vmail to group www-data and vice versa, including setting g+w, however, this isn't it.

So please help me
What do I have to enter to get a regular pattern.

Kind regards

ZeroEnna

EDIT: I just got another idea:

would this work for cmd_learn:

"sa-learn --ham %f" where %f is the complete path to the mailfile (i don't use mbox, I have one file for each several mail)?

JohnDoh

QuoteSo basically all spam is to be stored in .Junk, all ham is to be stored in cur.
This is the default behaviour of the plugin you dont need to use any of the drivers. When you click mark as junk the message will be moved to which ever folder is defined as your junk folder in RC. pressing mark as ham moves it back to the inbox.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

ZeroEnna

So I just leave everything as it is (driver = null;) and it works?
Okay, I'll try it, and if it does not work, I report it here :)

ZeroEnna

So I have.. well, partial success.
When the mail is opened, and I click on the MAJ2 Icon, it is moved to the other folder. However in the overview, I mark the mail and click on the icon, but nothing happens except for the color of the marking, which switches from red to gray.
Somethings wrong?

JohnDoh

#9
QuoteSomethings wrong?
certainly sounds like it.

we need alot more information before any one can help.....
what browser are you using?
what version of RC?
what version of the plugin?
are there any JS errors before or after you press the button?
is there anything in the RC error log?
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

stkcode

#10
@ZeroEnna

Set $rcmail_config['markasjunk2_debug'] = true;
Please post log results here (if any).