Hello,
You can now get / set / unset user's defaults and settings using
sogo-tool. This avoid clunky backup/restore + file edition in order to
change some user's values.
Here are some usage examples.
To get a value for lmarcotte's defaults (the key is SOGoDayStartTime), do:
% sogo-tool user-preferences get defaults lmarcotte SOGoDayStartTime
2011-06-29 13:52:18.428 sogo-tool[32133] value for key
"SOGoDayStartTime": "09:00"
To unset (ie., delete) that key/value:
% sogo-tool user-preferences unset defaults lmarcotte SOGoDayStartTime
To set it back (in JSON format):
% sogo-tool user-preferences set defaults lmarcotte SOGoTimeFormat
'{"SOGoTimeFormat": "%H:%M"}'
You can also manipulate complex values - like Sieve scripts. For
example, to change the redirect of lmarcotte, you should do:
% sogo-tool user-preferences set defaults lmarcotte cyrus:QWERTY Forward
'{"forwardAddress": ["[email protected]"], "enabled": true, "keepCopy": false}'
Note in this example that you have to pass valid authname/password of a
Sieve's admin ("cyrus" in my example). This is required for Forward,
Vacation and SOGoSieveFilters keys since the Sieve script will need to
be regenerated and you don't necessary have the user's password - unless
you're a twisted sysadmin ;-)
Overall, sogo-tool can now be used to really ease migration to SOGo when
you want to consider some (if not most) user's preferences in previous
systems, and you want to script the migration quite easily.
The code has just been pushed so it'll be available in the upcoming
nightly builds.
Regards,
--
Ludovic Marcotte
[email protected] :: +1.514.755.3630 :: www.inverse.ca
Inverse inc. :: Leaders behind SOGo (www.sogo.nu) and PacketFence
(www.packetfence.org)
--
[email protected]
https://inverse.ca/sogo/lists