Author Topic: Easy SpamAssassin Filtering  (Read 37191 times)

Offline CyborgBBR

  • Newbie
  • *
  • Posts: 1
Easy SpamAssassin Filtering
« Reply #30 on: May 14, 2009, 09:10:18 AM »
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?

Offline akn

  • Newbie
  • *
  • Posts: 5
Looking for a working patch, too.
« Reply #31 on: October 25, 2010, 11:08:17 AM »
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.
« Last Edit: October 25, 2010, 11:11:00 AM by akn »

Offline akn

  • Newbie
  • *
  • Posts: 5
Looking for a working patch for the current version (0.4.2).
« Reply #32 on: October 25, 2010, 11:18:05 AM »
The script is not working for the current version of RoundCube (0.4.2). Does anyone have a working one?

Offline akn

  • Newbie
  • *
  • Posts: 5
Counting of unread messages in inbox folder after moving the spam message(s).
« Reply #33 on: October 26, 2010, 04:17:12 AM »
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... ???

Offline F0iL

  • Newbie
  • *
  • Posts: 3
Easy SpamAssassin Filtering
« Reply #34 on: November 24, 2010, 03:07:41 AM »
Quote from: akn;30911
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.

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 :(