Ok.
I found a script by midnightz (
http://www.roundcubeforum.net/plug-ins/2565-replacement-easy-spamassassin-filtering.html )
I just made it more simple :
You just have to edit ./program/steps/mail/func.inc, ~line 245
After :
// create row for each message
foreach ($a_headers as $i => $header) //while (list($i, $header) = each($a_headers))
{
Add :
// ******************************************************
// ADD by woOtzee.com SPAM FIX
$spamfix_subject = Q(rcube_imap::decode_mime_string($header->subject, $header->charset));
if ($mbox!=$CONFIG['trash_mbox'] && $mbox!=$CONFIG['junk_mbox']) {
if (preg_match("'^\[SPAM\]'",$spamfix_subject) && !$header->seen) {
$IMAP->move_message( array($header->uid), $CONFIG['junk_mbox'], $mbox );
continue;
}
}
// ADD by woOtzee.com SPAM FIX
// ******************************************************
All unread mail marked as spam will be redirect to your junk box.
If you se a mail witch isn't spam in junk box, just mark it as read, and put it again
in the inbox box.
But, you need to clic on the mail icon on the top of the page to make it works.
If your spam tag isn't [SPAM] but, ***SPAM*** for exemple, like in the begin of
this post, just replace :
^\[SPAM\]
by :
/^\*\*\*SPAM\*\*\*/
Hope there's no mistake, it works for me !