[ingo] editing sieve scripts

Liam Hoekenga liamr at umich.edu
Mon Feb 7 14:49:01 PST 2005


>> Using sieve...
>>
>> What I want to do is to have some default rules for each new user...
>>
>> i.e.
>>
>> if header :contains "X-Spam-FLAG" "YES" {
>>  fileinto "INBOX.SPAMBOX";
>>  stop;
>>
>> SNIP
>>
>> Is it just best to stuff that value into the table for each new user or
>
> Yes.

You could also change the default value for $_prefs['rules'] in
ingo/config/prefs.php.  We'd considered doing something similar, where we'd
place messages with the X-DSPAM-Result into the DSPAM folder.  I was able to
create default rules by adding to the "rules" pref:


$_prefs['rules'] = array(
     'value' => 
a:3:{i:0;a:3:{s:4:"name";s:9:"Whitelist";s:6:"action";i:' . INGO
_STORAGE_ACTION_WHITELIST .
';s:7:"disable";b:1;}i:1;a:3:{s:4:"name";s:9:"Blacklist";s:6:"action";i:' .
INGO_STORAGE_ACTION_BLACKLIST
. ';s:7:"disable
";b:1;}i:2;a:7:{s:4:"name";s:7:"Spambox";s:7:"combine";s:1:"1";s:10:"conditions"
;a:1:{i:0;a:4:{s:5:"field";s:14:"X-DSpam-Result";s:4:"type";i:1;s:5:"match";s:2:
"is";s:5:"value";s:4:"Spam";}}s:12:"action-value";s:5:"DSPAM";s:6:"action";s:1:"
2";s:4:"stop";s:1:"1";s:5:"flags";i:0;}}',
     'locked' => false,
     'shared' => false,
     'type' => 'implicit'
);

Liam



More information about the ingo mailing list