Re: [SOGo] Sieve filters / sogo-tool

2024-03-21 Thread Christian Mack

Hello

Am 21.03.24 um 11:01 schrieb Rainer Ruprechtsberger 
(rruprechtsber...@volkshilfe-ooe.at):

Hi,
I'm trying to add sieve filter to accounts that do not have any:

sogo-tool user-preferences set settings username SOGoSieveFilters -f 
spamsieve.json -p /etc/sogo/sieve.creds


This gives me an error:

sogo-tool: Uncaught exception NSInvalidArgumentException, reason: 
SoHTTPException(instance) does not recognize setContext


Does this mean I can't set SOGoSieveFilters at all? The documentation 
example is with forward..




I didn't see that error message till now.
But you only can set SIEVE rules on accounts, who already logged in once.

I have set a default filter in sogo.conf.
It will be added for all new accounts on first login.
Example:
...
SOGoSieveFilters = (
{
actions = (
{
argument = "Spam";
method = fileinto;
},
{
argument = "";
method = stop;
}
);
active = <*I0>;
match = any;
name = Spam;
rules = (
{
 "custom_header" = "X-Spam-Flag";
 field = header;
 operator = is;
 value = YES;
}
);
}
);
...

Beware:
For Booleans I had to use Integers in a special format, e.g. <*I0> for 
zero or NO.


For already existing accounts, who already logged in, you can use your 
command.



Kind regards,
Christian Mack

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



smime.p7s
Description: Kryptografische S/MIME-Signatur


[SOGo] Sieve filters / sogo-tool

2024-03-21 Thread Rainer Ruprechtsberger

Hi,
I'm trying to add sieve filter to accounts that do not have any:

sogo-tool user-preferences set settings username SOGoSieveFilters -f 
spamsieve.json -p /etc/sogo/sieve.creds


This gives me an error:

sogo-tool: Uncaught exception NSInvalidArgumentException, reason: 
SoHTTPException(instance) does not recognize setContext


Does this mean I can't set SOGoSieveFilters at all? The documentation 
example is with forward..


I could not find anything regarding this..

Thanks for any hints..

--
Rainer Ruprechtsberger
Volkshilfe Oberösterreich
IT
4020 Linz, Glimpfingerstrasse 48
Tel.: +43 732 3405 123
Mobil.: +43 676 8734 1123

ZVR Zahl: 064371505

Volkshilfe. Wir sind für die Menschen da.