[SOGo] Global Allow return receipts for some messages

2013-09-24 Thread Donny Brooks
I am needing to set the Allow return receipts for some messages to Ask me 
for every user on my domain without having to ask them to do it. Is this a 
setting I can push via the global settings? Or is there a way to do a backup 
and restore of all users settings with that setting enabled?

-- 

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


Re: [SOGo] Global Allow return receipts for some messages

2013-09-24 Thread Ludovic Marcotte

On 2013-09-23 3:55 PM, Donny Brooks wrote:

I am needing to set the Allow return receipts for some messages to Ask me 
for every user on my domain without having to ask them to do it. Is this a setting I can push via 
the global settings? Or is there a way to do a backup and restore of all users settings with that 
setting enabled?

You could use sogo-tool for this.

--
Ludovic Marcotte
lmarco...@inverse.ca  ::  +1.514.755.3630  ::  http://inverse.ca
Inverse inc. :: Leaders behind SOGo (http://sogo.nu) and PacketFence 
(http://packetfence.org)

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


Re: [SOGo] Global Allow return receipts for some messages

2013-09-24 Thread Donny Brooks
 
 
 
On Tuesday, September 24, 2013 05:59 AM CDT, Ludovic Marcotte 
lmarco...@inverse.ca wrote: 
 
 On 2013-09-23 3:55 PM, Donny Brooks wrote:
  I am needing to set the Allow return receipts for some messages to Ask 
  me for every user on my domain without having to ask them to do it. Is 
  this a setting I can push via the global settings? Or is there a way to do 
  a backup and restore of all users settings with that setting enabled?
 You could use sogo-tool for this.
 
 -- 
 Ludovic Marcotte
 lmarco...@inverse.ca  ::  +1.514.755.3630  ::  http://inverse.ca
 Inverse inc. :: Leaders behind SOGo (http://sogo.nu) and PacketFence 
 (http://packetfence.org)
 
 -- 
 users@sogo.nu
 https://inverse.ca/sogo/lists
 

I have looked into this and it appears I will need to run the following for 
each user:

sudo -u sogo sogo-tool user-preferences set defaults %user% 
SOGoMailReceiptAllow '{SOGoMailReceiptAllow: 1}'
sudo -u sogo sogo-tool user-preferences set defaults %user% 
SOGoMailReceiptAnyAction '{SOGoMailReceiptAnyAction: ask}'
sudo -u sogo sogo-tool user-preferences set defaults %user% 
SOGoMailReceiptNonRecipientAction '{SOGoMailNonRecipientAction: ask}'
sudo -u sogo sogo-tool user-preferences set defaults %user% 
SOGoMailReceiptOutsideDomainAction '{SOGoMailReceiptOutsideDomainAction: 
ask}'

Is there an easy way with sogo-tool to have it do that for all 200 users?

-- 

Donny B. 

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


Re: [SOGo] Global Allow return receipts for some messages

2013-09-24 Thread Donny Brooks

 
 
On Tuesday, September 24, 2013 07:22 AM CDT, Donny Brooks 
dbro...@mdah.state.ms.us wrote: 
 
  
  
  
 On Tuesday, September 24, 2013 05:59 AM CDT, Ludovic Marcotte 
 lmarco...@inverse.ca wrote: 
  
  On 2013-09-23 3:55 PM, Donny Brooks wrote:
   I am needing to set the Allow return receipts for some messages to Ask 
   me for every user on my domain without having to ask them to do it. Is 
   this a setting I can push via the global settings? Or is there a way to 
   do a backup and restore of all users settings with that setting enabled?
  You could use sogo-tool for this.
  
  -- 
  Ludovic Marcotte
  lmarco...@inverse.ca  ::  +1.514.755.3630  ::  http://inverse.ca
  Inverse inc. :: Leaders behind SOGo (http://sogo.nu) and PacketFence 
  (http://packetfence.org)
  
  -- 
  users@sogo.nu
  https://inverse.ca/sogo/lists
  
 
 I have looked into this and it appears I will need to run the following for 
 each user:
 
 sudo -u sogo sogo-tool user-preferences set defaults %user% 
 SOGoMailReceiptAllow '{SOGoMailReceiptAllow: 1}'
 sudo -u sogo sogo-tool user-preferences set defaults %user% 
 SOGoMailReceiptAnyAction '{SOGoMailReceiptAnyAction: ask}'
 sudo -u sogo sogo-tool user-preferences set defaults %user% 
 SOGoMailReceiptNonRecipientAction '{SOGoMailNonRecipientAction: ask}'
 sudo -u sogo sogo-tool user-preferences set defaults %user% 
 SOGoMailReceiptOutsideDomainAction '{SOGoMailReceiptOutsideDomainAction: 
 ask}'
 
 Is there an easy way with sogo-tool to have it do that for all 200 users?
 
 -- 
 
 Donny B. 
 
 -- 
 users@sogo.nu
 https://inverse.ca/sogo/lists
 
Just for future prosperity sake here is how I did it:

First run a backup of all users with sogo-tool. I put my backups in /backup on 
the server:

sudo -u sogo-tool backup /backup ALL

Then I created the settings.sh file with the following contents:

#!/bin/bash
for user in $(ls /backup/ ); do
sudo -u sogo sogo-tool user-preferences set defaults $user SOGoMailReceiptAllow 
'{SOGoMailReceiptAllow: 1}'
sudo -u sogo sogo-tool user-preferences set defaults $user 
SOGoMailReceiptAnyAction '{SOGoMailReceiptAnyAction: send}'
sudo -u sogo sogo-tool user-preferences set defaults $user 
SOGoMailReceiptNonRecipientAction '{SOGoMailNonRecipientAction: send}'
sudo -u sogo sogo-tool user-preferences set defaults $user 
SOGoMailReceiptOutsideDomainAction '{SOGoMailReceiptOutsideDomainAction: 
ignore}'
done



chmod +x settings.sh 

then run it. Should set all settings you have for it. I believe this could be 
used for any kind of preference you want to change. Hope it helps someone else.

-- 

Donny B. 

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