[ingo] Enabling default filter rules

Jan Schneider jan at horde.org
Thu Jul 19 08:57:06 UTC 2012


Zitat von Rodrigo Abantes Antunes <rodrigoantunes at pelotas.ifsul.edu.br>:

> Hi I need to enable spam rule by default. Here is my  
> $_prefs['rules'] in prefs.php. How should it be in prefs.local.php  
> to enable the spam rule?
>
> $_prefs['rules'] = array(
>     'value' =>  
> 'a:5:{i:0;a:2:{s:4:"name";s:9:"Whitelist";s:6:"action";i:' .  
> Ingo_Storage::ACTION_WHITELIST .  
> ';}i:1;a:3:{s:4:"name";s:8:"Vacation";s:6:"action";i:' .  
> Ingo_Storage::ACTION_VACATION .  
> ';s:7:"disable";b:1;}i:2;a:2:{s:4:"name";s:9:"Blacklist";s:6:"action";i:' .  
> Ingo_Storage::ACTION_BLACKLIST . ';}i:3;a:3:{s:4:"name";s:11:"Spam  
> Filter";s:6:"action";i:' . Ingo_Storage::ACTION_SPAM .  
> ';s:7:"disable";b:1;}i:4;a:2:{s:4:"name";s:7:"Forward";s:6:"action";i:' .  
> Ingo_Storage::ACTION_FORWARD . ';}}',
>     'locked' => false,
>     'type' => 'implicit'
> );
>
>
> Should I set something like this? Ps.: I need to change only the spam rule.
>
> $_prefs['rules']['value'] =  
> 'a:5:{i:0;a:2:{s:4:"name";s:9:"Whitelist";s:6:"action";i:' .  
> Ingo_Storage::ACTION_WHITELIST .  
> ';}i:1;a:3:{s:4:"name";s:8:"Vacation";s:6:"action";i:' .  
> Ingo_Storage::ACTION_VACATION .  
> ';s:7:"disable";b:1;}i:2;a:2:{s:4:"name";s:9:"Blacklist";s:6:"action";i:' .  
> Ingo_Storage::ACTION_BLACKLIST . ';}i:3;a:3:{s:4:"name";s:11:"Spam  
> Filter";s:6:"action";i:' . Ingo_Storage::ACTION_SPAM .  
> ';s:7:"enable";b:1;}i:4;a:2:{s:4:"name";s:7:"Forward";s:6:"action";i:' .  
> Ingo_Storage::ACTION_FORWARD . ';

Change s:7:"enable";b:1; to s:7:"enable";b:0; after the  
Ingo_Storage::ACTION_SPAM part.

-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the ingo mailing list