From 51889af837e4b3dd85104cabd0a76fc6532e34e3 Mon Sep 17 00:00:00 2001 From: Dinko Korunic Date: Tue, 19 Aug 2008 16:56:08 +0200 Subject: [PATCH] - uklonjeni DCC parametri i ovisnost iz paketa --- README.CARNet | 4 ++-- debian/changelog | 7 +++++++ debian/config | 12 ------------ debian/control | 2 +- debian/postinst | 31 +++++++++++++------------------ debian/postrm | 6 ++++++ debian/templates | 9 --------- local.cf | 7 +------ 8 files changed, 30 insertions(+), 48 deletions(-) diff --git a/README.CARNet b/README.CARNet index 244cc79..012fee1 100644 --- a/README.CARNet +++ b/README.CARNet @@ -2,7 +2,7 @@ spamassassin-cn ~~~~~~~~~~~~~~~ Ovo je dodatak na standardni SpamAssassin paket. Glavne razlike su u -mogucnosti upravljanja postavkama (Bayes klasifikator, Razor2, DCC, Pyzor) +mogucnosti upravljanja postavkama (Bayes klasifikator, Razor2, Pyzor) u local.cf te potpuniji local.cf predlozak sa postavkama spremnim za produkciju. Takodjer, koriste se popularna SARE pravila kroz sa-update mehanizam (GPG potpisani updateovi), a i sam SpamAssassin se automatski @@ -24,4 +24,4 @@ Standardno Pyzor i Bayes nisu ukljuceni iz sljedecih razloga: Takodjer se standardno ne omogucuje ni SpamAssassin daemon odnosno spamd, buduci da je na instalacijama sa Amavis posluziteljem suvisan. - -- Dinko Korunic Fri, 14 Sep 2007 15:23:37 +0200 + -- Dinko Korunic Tue, 19 Aug 2008 16:55:47 +0200 diff --git a/debian/changelog b/debian/changelog index b39a228..c83b68f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +spamassassin-cn (2:3.1.7-4) stable; urgency=low + + * izbacivanje DCC s obzirom da vise nije u Debian repozitorijima zbog + sigurnosnih problema i licencnih problema + + -- Dinko Korunic Tue, 19 Aug 2008 16:42:11 +0200 + spamassassin-cn (2:3.1.7-3) stable; urgency=low * gasenje ok_languages, bayes_use_chi2_combining i pyzor opcija koje se u diff --git a/debian/config b/debian/config index 21335d6..564cc14 100755 --- a/debian/config +++ b/debian/config @@ -20,17 +20,6 @@ if [ -s $confdir/local.cf ]; then fi fi - # check if user had use_dcc already - db_get spamassassin-cn/usedcc || true - if [ -z "$RET" ]; then - usedcc=$(grep -e '^use_dcc ' $confdir/local.cf | cut -d ' ' -f2-) - if [ "x$usedcc" = "x1" ]; then - db_set spamassassin-cn/usedcc "true" - elif [ "x$usedcc" = "x0" ]; then - db_set spamassassin-cn/usedcc "false" - fi - fi - # check if user had use_razor2 already db_get spamassassin-cn/userazor2 || true if [ -z "$RET" ]; then @@ -55,7 +44,6 @@ db_go || true db_input medium spamassassin-cn/usebayes || true db_input medium spamassassin-cn/userazor2 || true -db_input medium spamassassin-cn/usedcc || true db_input high spamassassin-cn/runservice || true db_go || true diff --git a/debian/control b/debian/control index b140f65..7c9086f 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.7.2 Package: spamassassin-cn Architecture: all -Depends: spamassassin (>= 3.1.7-1~bpo.1), razor (>= 2.670-1sarge2), libnet-dns-perl, carnet-tools-cn (>= 2.0), dcc-client (>= 1.2.74-2), gnupg (>= 1.4.1-1.sarge7), libmail-dkim-perl (>= 0.19-3), libcrypt-openssl-bignum-perl (>= 0.03-1), ${misc:Depends} +Depends: spamassassin (>= 3.1.7-1~bpo.1), razor (>= 2.670-1sarge2), libnet-dns-perl, carnet-tools-cn (>= 2.0), gnupg (>= 1.4.1-1.sarge7), libmail-dkim-perl (>= 0.19-3), libcrypt-openssl-bignum-perl (>= 0.03-1), ${misc:Depends} Recommends: amavis Description: Perl-based spam filter using text analysis SpamAssassin is a very powerful and fully configurable spam filter diff --git a/debian/postinst b/debian/postinst index 85f6874..3853209 100755 --- a/debian/postinst +++ b/debian/postinst @@ -42,9 +42,6 @@ use_bayes="$RET" db_get spamassassin-cn/userazor2 || true use_razor2="$RET" -db_get spamassassin-cn/usedcc || true -use_dcc="$RET" - db_get spamassassin-cn/runservice || true run_service="$RET" @@ -177,8 +174,8 @@ if [ -f $examdir/local.cf ]; then rm -f $confdir/local.cf.$$.$$ fi - # set bayes/razor2/dcc in local.cf.$$ - for i in bayes razor2 dcc; do + # set bayes/razor2 in local.cf.$$ + for i in bayes razor2; do use_name="use_$i" use_value=$(eval echo \$$use_name) if [ "$use_value" = "true" ]; then @@ -214,21 +211,9 @@ if [ -f $examdir/local.cf ]; then rm -f $confdir/local.cf.$$ fi -# enable requested plugins in SA +# enable/disable plugins in SA list=$(find /etc/spamassassin -type f -name 'v*.pre') for i in $list; do - # enable DCC if requested - if [ "$use_dcc" = "true" ]; then - cp -f $i $i.$$ - plugin="loadplugin Mail::SpamAssassin::Plugin::DCC" - cp_check_and_sed "^.*#.*$plugin.*$" \ - "s/^.*#.*$plugin.*$/$plugin/g" $i.$$ || true - if ! cmp -s $i.$$ $i; then - mv -f $i.$$ $i - fi - rm -f $i.$$ - fi - # enable DKIM cp -f $i $i.$$ plugin="loadplugin Mail::SpamAssassin::Plugin::DKIM" @@ -248,6 +233,16 @@ for i in $list; do mv -f $i.$$ $i fi rm -f $i.$$ + + # disable DCC + cp -f $i $i.$$ + plugin="loadplugin Mail::SpamAssassin::Plugin::DCC" + cp_check_and_sed "^$plugin.*$" \ + "s/^$plugin.*$/#$plugin/g" $i.$$ || true + if ! cmp -s $i.$$ $i; then + mv -f $i.$$ $i + fi + rm -f $i.$$ done # check and replace /etc/default/spamasassin if needed diff --git a/debian/postrm b/debian/postrm index 4df7675..24cd8cd 100755 --- a/debian/postrm +++ b/debian/postrm @@ -17,6 +17,9 @@ set -e # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package +# Debconf +. /usr/share/debconf/confmodule + case "$1" in purge) # continue below @@ -30,6 +33,9 @@ esac # remove spamd run directory dpkg-statoverride --remove /var/run/spamd >/dev/null 2>&1 || true +# purge debconf database we don't need +db_purge + # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. diff --git a/debian/templates b/debian/templates index c75bcbf..6890256 100644 --- a/debian/templates +++ b/debian/templates @@ -18,15 +18,6 @@ Description: Zelite li koristiti Razor2: klasificiranju i filtriranju spama. Receno predstavlja komplementarnu tehniku standardnom statickom filtriranju. -Template: spamassassin-cn/usedcc -Type: boolean -Default: true -Description: Zelite li koristiti DCC: - SpamAssassin moze koristiti DCC (Distributed Checksum - Clearinghouse) mrezu. Recena je distribuirana mreza namijenjena - klasificiranju i filtriranju spama. Receno predstavlja - komplementarnu tehniku standardnom statickom filtriranju. - Template: spamassassin-cn/runservice Type: boolean Default: false diff --git a/local.cf b/local.cf index ee39262..c8e8357 100644 --- a/local.cf +++ b/local.cf @@ -41,12 +41,7 @@ use_razor2 1 razor_timeout 10 # Distributed Checksum Clearinghouse (DCC) options -use_dcc 1 -dcc_timeout 10 -dcc_timeout 10 -dcc_body_max 999999 -dcc_fuz1_max 999999 -dcc_fuz2_max 999999 +use_dcc 0 # Auto-whitelist to track long-term average score for sender # AWL should be cleaned from time to time with check_whitelist program -- 1.7.10.4