Roundcube Community Forum

 

Easy SpamAssassin Filtering

Started by Steve Corona, October 05, 2007, 02:40:16 PM

Previous topic - Next topic

CyborgBBR

Hello dawn.

I've copied your Code.
But it doesn't work.

Mails with ***SPAM*** in the subject stay in my standard inbox.

Any other idea how i can filter spam mails?

akn

#31
Any news here? A patch for the current version would be nice, since my provider does not use Sieve etc. I have to move the spam messages afterwards in roundcube.

akn

The script is not working for the current version of RoundCube (0.4.2). Does anyone have a working one?

akn

Quote from: woOtzee;18259// ******************************************************
  // 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... ???

F0iL

Quote from: akn;30911The 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.
Where did you put this part of code?
In 0.3.1 everything was fine, but in 0.4.2 I can't find suitable place in /program/steps/email/func.php for this :(