From 3173912c8a40b82b62ef2c5cb5e34bb75c535380 Mon Sep 17 00:00:00 2001 From: Dinko Korunic Date: Tue, 16 Oct 2007 14:47:54 +0000 Subject: [PATCH] r11: - enable DCC plugin - enable DKIM plugin --- debian/control | 2 +- debian/postinst | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index d4783c6..efbd1ba 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), ${misc:Depends} +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), ${misc:Depends} Conflicts: pyzor (<< 1:0.4.0+cvs20030201-3) Recommends: amavis Description: Perl-based spam filter using text analysis diff --git a/debian/postinst b/debian/postinst index 0fc4320..ed61747 100755 --- a/debian/postinst +++ b/debian/postinst @@ -208,6 +208,30 @@ if [ -f $examdir/local.cf ]; then rm -f $confdir/local.cf.$$ fi +# enable requested 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 + 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 + plugin="loadplugin Mail::SpamAssassin::Plugin::DKIM" + 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 if [ "$run_service" = "true" -a \ -f $examdir/etc-default-spamassassin-$run_as_user ]; then -- 1.7.10.4