[ingo] Default sieve filter

Craig White craigwhite at azapple.com
Thu Jan 4 07:03:29 PST 2007


On Thu, 2007-01-04 at 11:33 +0100, Jose Marcio Martins da Cruz wrote:
> Lars Stavholm wrote:
> 
> > 
> > We use Cyrus IMAP, and I'v been looking for this kind of
> > setup for a central/shared sieve script for all users.
> > I just haven't had time to test it in Horde myself yet.
> > 
> > You're original question was: "Is there a way to define
> > a default sieve filter?", and this is one way. whether it
> > works or not is another story. I will try it myself eventually.
> 
> No. I'd like an (maybe) even simpler thing : to set up an *initial*
> filter when the mailbox is created. Up to the user to continue using
> the initial filter or to modify or delete it and and create a new one.
----
cyrus has patches available for 'auto sieve' scripts to be
created/activated upon mailbox creation which may be of use to you...

http://email.uoa.gr/projects/cyrus/
----
> 
> It should be readable by Ingo, in order to let it modify it - if he want
> only to do minor changes.
> 
----
I have change horde/ingo/prefs.php to this...

// filter rules
$_prefs['rules'] = array(
    'value' =>
'a:6:{i:0;a:2:{s:4:"name";s:9:"Whitelist";s:6:"action";i:9;}i:1;a:3:{s:4:"name";s:8:"Vacation";s:6:"action";i:8;s:7:"disable";b:1;}i:2
;a:2:{s:4:"name";s:9:"Blacklist";s:6:"action";i:7;}i:3;a:2:{s:4:"name";s:7:"Forward";s:6:"action";i:10;}i:4;a:7:{s:4:"name";s:9:"SPAM Flag";s:7:"comb
ine";s:1:"1";s:10:"conditions";a:1:{i:0;a:4:{s:5:"field";s:11:"X-Spam-FLAG";s:4:"type";i:1;s:5:"match";s:8:"contains";s:5:"value";s:3:"YES";}}s:12:"a
ction-value";s:13:"INBOX.SPAMBOX";s:6:"action";s:1:"2";s:4:"stop";s:1:"1";s:5:"flags";i:0;}i:5;a:7:{s:4:"name";s:10:"VIRUS Flag";s:7:"combine";s:1:"1
";s:10:"conditions";a:1:{i:0;a:4:{s:5:"field";s:12:"X-Virus-FLAG";s:4:"type";i:1;s:5:"match";s:8:"contains";s:5:"value";s:3:"YES";}}s:12:"action-valu
e";s:14:"INBOX.VIRUSBOX";s:6:"action";s:1:"2";s:4:"stop";s:1:"1";s:5:"flags";i:0;}}',
    'locked' => false,
    'shared' => false,
    'type' => 'implicit'
);

(line breaks will make this unusable) but the idea is that you can
create rules as a user and use that users rules to create the value for
the 'rules' prefs in prefs.php but note, that these rules aren't
activated until the user goes into Ingo and activates the script.

Craig



More information about the ingo mailing list