Roundcube Community Forum

 

Managesieve plugin and spam filter

Started by tonyvier, March 19, 2015, 03:11:41 AM

Previous topic - Next topic

tonyvier

Hi,

I had a spam filter on my server, and spam was put in the Junk folder automatically.

I played a bit with the managesieve Roundcube plugin and it works good, sadly I have not found a (Android) mail client that pushes notifications for more than just the Inbox alone yet....

But, since I have used the managesieve plugin, the spam messages get delivered to the Inbox again...

I have in /var/lib/dovecot/sieve/default.sieve :

require "fileinto";
if header :contains "X-Spam-Flag" "YES" {
  fileinto "Junk";
}

With the right permissions....

Thanks!

JohnDoh

In the configuration of Dovecot sieve did you set the location of `/var/lib/dovecot/sieve/default.sieve` using `sieve_default` (or `sieve_global_path`)?

From the Dovecot manual:
Quotesieve_default = (v0.3+) - The location of the default personal sieve script file which gets executed ONLY if user's private Sieve script does no exist, e.g. /var/lib/dovecot/default.sieve.

If you are using `sieve_default` but you want to keep the default file executed as well as the personal sieve script then you might try `sieve_before` or `sieve_after` instead.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

tonyvier

Ok, thanks I have a Global, and added before:

  # The default Sieve script when the user has none. This is a path to a global
  # sieve script file, which gets executed ONLY if user's private Sieve script
  # doesn't exist. Be sure to pre-compile this script manually using the sievec
  # command line tool.
  # --> See sieve_before fore executing scripts before the user's personal
  #     script.
  #sieve_default = /var/lib/dovecot/sieve/default.sieve
 
  sieve_before = /var/lib/dovecot/sieve/default.sieve
  sieve_global_path = /var/lib/dovecot/sieve/default.sieve

Will test now....

tonyvier

#3
And works!

Thanks...

BTW is there a way to hide the dovecot.sieve folder from the IMAP client?

(and do you know of any android email client that can give PUSH notices on more than the Inbox only?)

Edit: K-9 :)


JohnDoh

I've never known the dovecot.sieve folder to show up in IMAP I think it must be something about your dovecot/sieve config but I'm not sure what, sorry.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

tonyvier

Yes it shows up,

The dovecot.sieve directory has become part of the IMAP folder structure. see pic how it shows in Roundcube (or other clients), structure is the same as IMAP folder.

Its a standard postfix dovecot installation, with virtual domains / mailboxes.....



tonyvier

Oh,  what would be a normal location of this folder?

tonyvier

Oh, its not a folder  :-[

Its a symbolic link to the managesieve.sieve file in the (virtual) users sieve directory....

It is created when the managesieve Roundcube plugin is first used...




tonyvier

Ok, found the solution here:

http://forum.froxlor.org/index.php/topic/12821-roundcube-and-managesieve-issues/page-3

In short:

in 90-sieve.conf there is : sieve = ~/.dovecot.sieve

Change it to sieve = ~/sieve/.dovecot.sieve

Move the .dovecot.sieve and .dovecot.svbin to this sieve directory of the user.

Files with a "." show up as a imap folder..

It says here:

http://wiki2.dovecot.org/Pigeonhole/ManageSieve/Configuration

"Note: It is not wise to place this link inside your mail store, as it may be mistaken for a mail folder. Inside a maildir for instance, the default .dovecot.sieve would show up as phantom folder /dovecot/sieve in your IMAP tree."