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 = "<null>";
                    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

Attachment: smime.p7s
Description: Kryptografische S/MIME-Signatur

Reply via email to