// ******************************************************
// 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
// ******************************************************
The script works for me even in version 0.4.2, but there's one detail: The message count in the folder panel does not work properly.
When I start roundcube and there is a spam message within the inbox, the message is moved instantly, but there remains a (1) for the inbox in folder panel until the next time roundcube checks for new mails or manual refresh.
I'm looking for some code which brings roundcube to count again after moving the message...