From 2dc55fdd1399e94858b5ddc5540bfc7b4a5e25df Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 23 Mar 2017 13:05:36 +0100 Subject: [PATCH] Use expire-autoreply for SOGo 2 instead of update-autoreply --- root/etc/e-smith/templates/etc/cron.d/sogo/autoreply | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/root/etc/e-smith/templates/etc/cron.d/sogo/autoreply b/root/etc/e-smith/templates/etc/cron.d/sogo/autoreply index 6617f02..2360ca1 100644 --- a/root/etc/e-smith/templates/etc/cron.d/sogo/autoreply +++ b/root/etc/e-smith/templates/etc/cron.d/sogo/autoreply @@ -1 +1,5 @@ -0 0 * * * sogo /usr/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds +{ + my $version = qx(/bin/rpm -q --qf "%{version}" sogo-tool); + my $cmd = ($version =~ m/^2/) ? 'expire-autoreply' : 'update-autoreply'; + $OUT = "0 0 * * * sogo /usr/sbin/sogo-tool $cmd -p /etc/sogo/sieve.creds"; +}