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
ed61747
..
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
@@
-209,10
+215,11
@@
if [ -f $examdir/local.cf ]; then
fi
# enable requested plugins in SA
fi
# enable requested plugins in SA
-list=$(find /etc/spamassassin -type -f -name 'v*.pre')
+list=$(find /etc/spamassassin -type f -name 'v*.pre')
for i in $list; do
# enable DCC if requested
if [ "$use_dcc" = "true" ]; then
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
plugin="loadplugin Mail::SpamAssassin::Plugin::DCC"
cp_check_and_sed "^.*#.*$plugin.*$" \
"s/^.*#.*$plugin.*$/$plugin/g" $i.$$ || true
@@
-223,6
+230,7
@@
for i in $list; do
fi
# enable DKIM
fi
# enable DKIM
+ cp -f $i $i.$$
plugin="loadplugin Mail::SpamAssassin::Plugin::DKIM"
cp_check_and_sed "^.*#.*$plugin.*$" \
"s/^.*#.*$plugin.*$/$plugin/g" $i.$$ || true
plugin="loadplugin Mail::SpamAssassin::Plugin::DKIM"
cp_check_and_sed "^.*#.*$plugin.*$" \
"s/^.*#.*$plugin.*$/$plugin/g" $i.$$ || true
@@
-230,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