projects
/
spamassassin-cn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r14: - defaultni local.cf -- izbaci chi2, izbaci Pyzor, izbaci ok_languages,
[spamassassin-cn.git]
/
debian
/
postinst
diff --git
a/debian/postinst
b/debian/postinst
index
36ac9ec
..
85f6874
100755
(executable)
--- a/
debian/postinst
+++ b/
debian/postinst
@@
-191,6
+191,12
@@
if [ -f $examdir/local.cf ]; then
$confdir/local.cf.$$ || true
done
$confdir/local.cf.$$ || true
done
+ # remove obsolete options from old SA
+ egrep -v '^(bayes_use_chi2_combining|ok_languages|pyzor)' \
+ $confdir/local.cf.$$ > $confdir/local.cf.$$.$$ && \
+ mv -f $confdir/local.cf.$$.$$ $confdir/local.cf.$$
+ rm -f $confdir/local.cf.$$.$$
+
# different than template
if ! cmp -s $confdir/local.cf.$$ $confdir/local.cf; then
# backup if not zero size
# different than template
if ! cmp -s $confdir/local.cf.$$ $confdir/local.cf; then
# backup if not zero size
@@
-232,6
+238,16
@@
for i in $list; do
mv -f $i.$$ $i
fi
rm -f $i.$$
mv -f $i.$$ $i
fi
rm -f $i.$$
+
+ # disable Pyzor
+ cp -f $i $i.$$
+ plugin="loadplugin Mail::SpamAssassin::Plugin::Pyzor"
+ 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
done
# check and replace /etc/default/spamasassin if needed