Hello

My bad, exchange
    active = 1;
with
    active = <*I1>;


Kind regards,
Christian Mack

Am 25.05.20 um 18:15 schrieb David Faller ([email protected]):
> I had set under sogo.conf this:
> 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;
>     }
> );
> 
> 
> But active =1; will not be set for new created users which login the first 
> time. Under filters the rule is visible but not active, is there a way to 
> enforce this that this setting will be enabled by default?
> Also I tested it to set active = 0; but for existing users this setting is 
> not visible under the settings / filter tab on sogo.
> 
> So here I had 2 different parts for a handling first for new users and the 
> second for existing users.
> Perhaps you have an idea? 
> 
> Best Regards
> David Faller
> 
> 
> 
> Am 12.05.20, 11:47 schrieb "Christian Mack    
> ([email protected])" <[email protected] im Auftrag von 
> [email protected]>:
> 
>     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 ([email protected]):
>     > 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    
> ([email protected])" <[email protected] im Auftrag von 
> [email protected]>:
>     > 
>     >     Am 08.05.20 um 12:00 schrieb David Faller 
> ([email protected]):
>     >     > 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