On 2012-02-14, at 5:35 PM, Patrick Ben Koetter wrote:

> * Francis Lachapelle <users@sogo.nu>:
>>> is there a method to import existing sieve scripts from roundcubemail for
>>> example? I tried to overwrite the ones created by sogo, but that doesn't
>>> work :) is there perhaps another method to do this for 50+ accounts
>>> automatically or perhaps scripted? we have a cyrus-imapd-2.3.16 mail
>>> server and roundcube 0.3.1
>> 
>> You'll have to rely on a custom migration script and use sogo-tool to import
>> the filters definition from roundcube to SOGo. Here's how to call sogo-tool
>> :
>> 
>> # sogo-tool user-preferences
>> user-preferences get|set|unset defaults|settings user 
>> [authname:authpassword] key [value|-f filename]
>> 
>>       user       the user of whom to set the defaults/settings key/value
>>       value      the JSON-formatted value of the key
>> 
>>  Examples:
>>       sogo-tool user-preferences get defaults janedoe SOGoLanguage
>>       sogo-tool user-preferences unset settings janedoe Mail
>>       sogo-tool user-preferences set defaults janedoe SOGoTimeFormat 
>> '{"SOGoTimeFormat":"%I:%M %p"}'
> 
> I don't see how I would use sogo-tool to specify SIEVE rules. Is it possible?

You need to use the JSON representation of the rules that we use in SOGo. It's 
pretty simple. Define some rules in the Web interface and look at the JSON 
representation using sogo-tool :

sogo-tool user-preferences get defaults patrick SOGoSieveFilters

When setting new rules, sogo-tool will take care of updating the rules on your 
Sieve server :

sogo-tool user-preferences set defaults patrick admin:qwerty SOGoSieveFilters 
'{"SOGoSieveFilters": [{"active": true, "actions": [{"method": "fileinto", 
"argument": "myfolder"}], "rules": [{"operator": "contains", "field": 
"subject", "value": "bar"}], "match": "any", "name": "foo"}]}'


Francis

--
flachape...@inverse.ca :: +1.514.755.3640 :: http://www.inverse.ca
Inverse :: Leaders behind SOGo (http://sogo.nu) and PacketFence 
(http://packetfence.org)

-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Reply via email to