Hello

Yes, this will set the Spam filter rule for user.

Beware:
This will overwrite existing filters the user has defined himself already.
I would check for already defined filters first and inject the Spam
filter rule before all existing ones.


Kind regards,
Christian Mack

Am 08.05.20 um 18:35 schrieb David Faller (david.fal...@benelog.com):
> Thank you for the fast response,
> Little question to the end, to use this with sogo-tool would the be the 
> correct way?
> 
> ->  I would also stop processing SIEVE when encountering a Spam ;-)
> Thanks for this tip __
> 
> sogo-tool user-preferences set defaults user SOGoSieveFilters 
> '{"SOGoSieveFilters ": [{"actions": [{"argument": "Junk", "method": 
> "fileinto"},{[ {"argument": "<null>", "method": "stop"}], "name": 
> "Spam2Junk", "rules": [{"field": "header", "operator": "contains", 
> "custom_header": "X-Spam-Flag", "value": "YES"}], "match": "all", "active": 
> 1}]}'
> 
> This would be helpful to set existing user configuration, 
> Best Regards and wish a good weekend
> 
> 
> Am 08.05.20, 15:31 schrieb "Christian Mack    
> (christian.m...@uni-konstanz.de)" <users-requ...@sogo.nu im Auftrag von 
> users@sogo.nu>:
> 
>     Am 08.05.20 um 12:00 schrieb David Faller (david.fal...@benelog.com):
>     > Dear all,
>     > 
>     > I have a little question, cyrus-imapd global sieve script support is 
> limited, and SOGo users can also set sieve scripts easy,
>     > 
>     > I’d like to setup a global filter on sogo.conf:
>     > 
>     >   
>     > 
>     > SOGoSieveFilters = {
>     > 
>     >   [{"actions": [{"argument": "Junk", "method": "fileinto"}], "name": 
> "Spam2Junk", "rules": [{"field": "header", "operator": "contains", 
> "custom_header": "X-Spam-Flag", "value": "YES"}], "match": "all", "active": 
> 1}]
>     > 
>     > };
>     > 
>     >   
>     > 
>     > But with this setting sogo can’t start up.
>     > It’s good to know that I can adjust each user setting over the 
> sogo-tool  but there’s no option to set defaults to all users at one time.
>     > 
>     > I know the setting in sogo.conf will only work for new users, but I 
> think my formation here is wrong, could someone help?
>     > Best Regards,
>     > 
>     > David Faller
>     > 
> 
>     In sogo.conf you can not use json.
>     I would also stop processing SIEVE when encountering a Spam ;-)
>     See second action.
> 
>     Your example corrected and enhanced:
> 
>                  SOGoSieveFilters = (
>                      {
>                          actions = (
>                              {
>                                  argument = "Junk";
>                                  method = fileinto;
>                              },
>                              {
>                                  argument = "<null>";
>                                  method = stop;
>                              }
>                          );
>                          name = "Spam2Junk";
>                          rules = (
>                              {
>                                  field = "header";
>                                  operator = "contains";
>                                  "custom_header" = "X-Spam-Flag";
>                                  value = "YES";
>                              }
>                          );
>                          match = "all";
>                          active = 1;
>                      }
>                  );
> 
> 
>     Kind regards,
>     Christian Mack
> 


-- 
Christian Mack
Universität Konstanz
Kommunikations-, Informations-, Medienzentrum (KIM)
Abteilung IT-Dienste Forschung und Lehre
78457 Konstanz
+49 7531 88-4416

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to