Add support for vacation scheduling using a sieve admin account

tags/ipasserelle-groupware-0.2.37-1
Daniel Berteaud 8 years ago
parent 3cb2b15e1c
commit 987e0e06b4
  1. 3
      createlinks
  2. 6
      root/etc/cron.hourly/sogo-sessions
  3. 32
      root/etc/e-smith/db/configuration/migrate/SOGoSievePassword
  4. 1
      root/etc/e-smith/templates.metadata/etc/dovecot/master.sieve.127.0.0.1
  5. 3
      root/etc/e-smith/templates.metadata/etc/sogo/sieve.creds
  6. 1
      root/etc/e-smith/templates/etc/cron.d/sogo/autoreply
  7. 1
      root/etc/e-smith/templates/etc/cron.d/sogo/sessions
  8. 9
      root/etc/e-smith/templates/etc/dovecot/dovecot.conf/14AuthSieve
  9. 1
      root/etc/e-smith/templates/etc/dovecot/master.sieve.127.0.0.1/sogo
  10. 0
      root/etc/e-smith/templates/etc/dovecot/master.sieve.127.0.0.1/template-begin
  11. 1
      root/etc/e-smith/templates/etc/sogo/sieve.creds/sogo
  12. 0
      root/etc/e-smith/templates/etc/sogo/sieve.creds/template-begin

@ -10,6 +10,9 @@ templates2events("/etc/sogo/sogo.conf", qw(email-update bootstrap-console-save p
templates2events("/etc/sysconfig/sogo", qw(email-update bootstrap-console-save)); templates2events("/etc/sysconfig/sogo", qw(email-update bootstrap-console-save));
templates2events("/etc/logrotate.d/sogo", qw(email-update bootstrap-console-save)); templates2events("/etc/logrotate.d/sogo", qw(email-update bootstrap-console-save));
templates2events("/etc/pam.d/dovecot", qw(email-update bootstrap-console-save)); templates2events("/etc/pam.d/dovecot", qw(email-update bootstrap-console-save));
templates2events("/etc/sogo/sieve.creds", qw(email-update bootstrap-console-save));
templates2events("/etc/cron.d/sogo", qw(email-update bootstrap-console-save));
templates2events("/etc/dovecot/master.sieve.127.0.0.1", qw(email-update bootstrap-console-save));
safe_symlink("restart", "root/etc/e-smith/events/email-update/services2adjust/sogod"); safe_symlink("restart", "root/etc/e-smith/events/email-update/services2adjust/sogod");
safe_symlink("restart", "root/etc/e-smith/events/email-update/services2adjust/memcached-sogo"); safe_symlink("restart", "root/etc/e-smith/events/email-update/services2adjust/memcached-sogo");

@ -1,6 +0,0 @@
#!/bin/bash
TIME=$(/sbin/e-smith/db configuration getprop sogod SessionDuration || echo 1440)
# Remove old SOGo sessions entries
su -l -s /bin/bash sogo -c "/usr/sbin/sogo-tool expire-sessions $TIME"

@ -0,0 +1,32 @@
{
my $sogodrec = $DB->get('sogod')
|| $DB->new_record('sogod', {type => 'service'});
my $sogod_sieve_pw = $sogodrec->prop('SieveMasterPassword');
if (not $sogod_sieve_pw or length($sogod_sieve_pw) < 57)
{
use MIME::Base64 qw(encode_base64);
$sogod_sieve_pw = "not set due to error";
if ( open( RANDOM, "/dev/urandom" ) )
{
my $buf;
# 57 bytes is a full line of Base64 coding, and contains
# 456 bits of randomness - given a perfectly random /dev/random
if ( read( RANDOM, $buf, 57 ) != 57 )
{
warn("Short read from /dev/random: $!");
}
else
{
$sogod_sieve_pw = encode_base64($buf);
chomp $sogod_sieve_pw;
}
close RANDOM;
}
else
{
warn "Could not open /dev/urandom: $!";
}
$sogodrec->set_prop('SieveMasterPassword', $sogod_sieve_pw);
}
}

@ -0,0 +1,3 @@
PERMS=0640
UID="root"
GID="sogo"

@ -0,0 +1 @@
0 0 * * * sogo /usr/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds

@ -0,0 +1 @@
* * * * * sogo /usr/sbin/sogo-tool expire-sessions { $sogod{SessionDuration} || '60' }

@ -0,0 +1,9 @@
passdb \{
driver = passwd-file
master = yes
args = username_format=%u /etc/dovecot/master.%s.%r
\}
userdb \{
driver = passwd-file
args = username_format=%u /etc/dovecot/master.%s.%r
\}

@ -0,0 +1 @@
sogo-sieve:\{plain\}{ $sogod{SieveMasterPassword} }:101:101::/home/e-smith::allow_nets=127.0.0.1/8

@ -0,0 +1 @@
sogo-sieve:{ $sogod{SieveMasterPassword} }
Loading…
Cancel
Save