prva verzija za jessie
[spamassassin-cn.git] / debian / postinst
index e5d5a8f..faf9cf4 100755 (executable)
@@ -238,6 +238,13 @@ if [ -f $examdir/local.cf ]; then
         $confdir/local.cf.$$ || true
     echo "CN: Activated $trusted_networks as trusted networks"
 
+    if dpkg --compare-versions "$2" lt "2:3.3.5"; then
+      cp_check_and_sed "^bayes_auto_expire 1" \
+          "s#^bayes_auto_expire .*#bayes_auto_expire 0#g" \
+          $confdir/local.cf.$$ || true
+      echo "CN: Set bayes_auto_expire to 0"
+    fi
+        
     # different than template
     if ! cmp -s $confdir/local.cf.$$ $confdir/local.cf; then
         # backup if not zero size
@@ -402,7 +409,7 @@ echo "CN: SpamAssassin updates are now logged at /var/log/sa-update.log"
 if [ "x$restart" = "xyes" ]; then
     if [ -x /usr/sbin/invoke-rc.d ]; then
         pkill -f /usr/sbin/spamd || true
-        invoke-rc.d --quiet spamassassin restart
+        invoke-rc.d spamassassin restart
     else
         /etc/init.d/spamassassin restart
     fi