From cbe7e46051637583420e0119dc33272ea94c845b Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 25 Apr 2012 09:07:09 +0200 Subject: [PATCH] Revert "Add the possibility to put contacts in whitelist" This reverts commit 507aea2c66aad00e48bfa951fb8a9d379a735887. --- ipasserelle-groupware.spec | 8 ++--- root/etc/cron.daily/sogo_whitelist | 38 ---------------------- .../db/configuration/defaults/sogod/AutoWhiteList | 1 - .../locale/fr/etc/e-smith/web/functions/sogo | 8 ----- .../mail/spamassassin/local.cf/80sogo_whitelist | 12 ------- root/etc/e-smith/web/functions/sogo | 6 ---- .../site_perl/esmith/FormMagick/Panel/sogo.pm | 1 - 7 files changed, 2 insertions(+), 72 deletions(-) delete mode 100644 root/etc/cron.daily/sogo_whitelist delete mode 100644 root/etc/e-smith/db/configuration/defaults/sogod/AutoWhiteList delete mode 100644 root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/80sogo_whitelist diff --git a/ipasserelle-groupware.spec b/ipasserelle-groupware.spec index 379f02a..7fbb668 100644 --- a/ipasserelle-groupware.spec +++ b/ipasserelle-groupware.spec @@ -1,6 +1,6 @@ -%define version 0.2.1 -%define release 1.beta0 +%define version 0.2.0 +%define release 1 %define name ipasserelle-groupware Name: %{name} @@ -33,9 +33,6 @@ Based on smeserver-sogo from nethesis %changelog -* Tue Apr 24 2012 Daniel Berteaud - 0.2.1-1.sme -- Add the possibility to put contacts in whitelist - * Wed Mar 14 2012 Daniel Berteaud - 0.2.0-1.sme - Migrate to git @@ -135,7 +132,6 @@ rm -f %{name}-%{version}-filelist --file /var/service/memcached-sogo/log/run 'attr(0755, root, root)' \ --dir /var/log/memcached-sogo 'attr(0700, sogo, sogo)' \ --file /etc/cron.hourly/sogo-sessions 'attr(0755, root, root)' \ - --file /etc/cron.daily/sogo_whitelist 'attr(0755, root, root)' \ $RPM_BUILD_ROOT > %{name}-%{version}-%{release}-filelist %files -f %{name}-%{version}-%{release}-filelist diff --git a/root/etc/cron.daily/sogo_whitelist b/root/etc/cron.daily/sogo_whitelist deleted file mode 100644 index 6897630..0000000 --- a/root/etc/cron.daily/sogo_whitelist +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -HOME=/root - -SOGOWL=$(/sbin/e-smith/db configuration getprop sogod AutoWhiteList || $(echo no)) - -if [ "$SOGOWL" != 'yes' ]; then - exit 0 -fi - -OLDMD5=$(md5sum /etc/mail/spamassassin/sogo_whitelist) - -/usr/bin/mysql <<'EOF' | grep -iE "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$" \ - | tr '[:upper:]' '[:lower:]' | sed -e 's/^/whitelist_from /' > /etc/mail/spamassassin/sogo_whitelist -connect sogo; -SELECT CONCAT( - 'SELECT * FROM (SELECT c_mail FROM ', - GROUP_CONCAT(tb SEPARATOR ' UNION SELECT c_mail FROM '), - ') AS emails ORDER BY c_mail' -) -INTO @mailquery FROM -( -SELECT TABLE_NAME tb -FROM INFORMATION_SCHEMA.COLUMNS -WHERE column_name LIKE 'c_mail' -AND TABLE_SCHEMA='sogo' -) AS tbls; -PREPARE stmt FROM @mailquery; -EXECUTE stmt; -DEALLOCATE PREPARE stmt; -EOF - -NEWMD5=$(md5sum /etc/mail/spamassassin/sogo_whitelist) - -if [ "$OLDMD5" != "$NEWMD5" ]; then - /usr/bin/sv h /service/spamd -fi - diff --git a/root/etc/e-smith/db/configuration/defaults/sogod/AutoWhiteList b/root/etc/e-smith/db/configuration/defaults/sogod/AutoWhiteList deleted file mode 100644 index 7ecb56e..0000000 --- a/root/etc/e-smith/db/configuration/defaults/sogod/AutoWhiteList +++ /dev/null @@ -1 +0,0 @@ -no diff --git a/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/sogo b/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/sogo index 7952c47..8391aa4 100644 --- a/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/sogo +++ b/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/sogo @@ -59,12 +59,4 @@ ALLOWED_OR_NOT Autorisé ? - - AUTO_WL_DESC - Cette option permet de placer automatiquement les contacts des différents carnets d'adresses en liste blanche, afin que leurs mails ne soient jamais considérés comme spam - - - AUTO_WL - Contacts en liste blanche - diff --git a/root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/80sogo_whitelist b/root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/80sogo_whitelist deleted file mode 100644 index c2df56a..0000000 --- a/root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/80sogo_whitelist +++ /dev/null @@ -1,12 +0,0 @@ -{ - -my $sogowl = $sogod{'AutoWhiteList'} || 'no'; - -if ($sogowl eq 'yes'){ - $OUT .= 'include sogo_whitelist'; -} -else{ - $OUT .= ''; -} - -} diff --git a/root/etc/e-smith/web/functions/sogo b/root/etc/e-smith/web/functions/sogo index 8f12c38..897a274 100644 --- a/root/etc/e-smith/web/functions/sogo +++ b/root/etc/e-smith/web/functions/sogo @@ -65,12 +65,6 @@ __DATA__ PUBLIC_ACCESS_DESC - - AUTO_WL_DESC - - ALLOWED_GROUPS_DESC diff --git a/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/sogo.pm b/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/sogo.pm index 1e8791b..a8fe0d5 100644 --- a/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/sogo.pm +++ b/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/sogo.pm @@ -110,7 +110,6 @@ sub apply { $configdb->set_prop('sogod', 'EMailAlarms', $q->param("mailAlarm")); $configdb->set_prop('sogod', 'AuxiliaryUserAccounts', $q->param("auxAccounts")); $configdb->set_prop('sogod', 'PublicAccess', $q->param("publicAccess")); - $configdb->set_prop('sogod', 'AutoWhiteList', $q->param("autoWhiteList")); $configdb->set_prop('sogod', 'AllowedGroups', join(',', $q->param("allowedGroups"))); unless ( system ("/sbin/e-smith/signal-event", "email-update") == 0 ){