--- /dev/null
+#!/bin/sh
+
+set -e
+
+# load Debconf
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+confdir="/etc/spamassassin"
+
+if [ -s $confdir/local.cf ]; then
+ # check if user had use_bayes already
+ db_get spamassassin-cn/usebayes || true
+ if [ -z "$RET" ]; then
+ usebayes=$(grep -e '^use_bayes ' $confdir/local.cf | cut -d ' ' -f2-)
+ if [ "x$usebayes" = "x1" ]; then
+ db_set spamassassin-cn/usebayes "true"
+ elif [ "x$usebayes" = "x0" ]; then
+ db_set spamassassin-cn/usebayes "false"
+ 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
+ userazor2=$(grep -e '^use_razor2 ' $confdir/local.cf | cut -d ' ' -f2-)
+ if [ "x$userazor2" = "x1" ]; then
+ db_set spamassassin-cn/userazor2 "true"
+ elif [ "x$userazor2" = "x0" ]; then
+ db_set spamassassin-cn/userazor2 "false"
+ fi
+ fi
+fi
+
+# do we have amavisd-new
+db_get spamassassin-cn/runservice || true
+if [ -z "$RET" ]; then
+ if dpkg -l amavisd-new | grep -q '^.i'; then
+ db_set spamassassin-cn/runservice "false" || true
+ fi
+fi
+
+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
+
+db_get spamassassin-cn/runservice
+if [ "$RET" = "true" ]; then
+ db_input high spamassassin-cn/runasuser || true
+fi
+
+db_go || true
+
+# dh_installdebconf will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+Template: spamassassin-cn/usebayes
+Type: boolean
+Default: false
+Description: Zelite li Bayesian klasifikator:
+ SpamAssassin moze koristiti naivni Bayesian klasifikator poste.
+ Receni statisticki filtar predstavlja dodatni vid zastite od
+ spama, medjutim podrazumijeva intenzivno inicijalno i kasnije
+ redovno hranjenje spama i hama u sustav koristeci sa-learn
+ naredbu. Da bi receni filtar poceo raditi, nuzno je nahraniti
+ barem 1000 spam i 1000 ham e-mailova.
+
+Template: spamassassin-cn/userazor2
+Type: boolean
+Default: true
+Description: Zelite li koristiti Razor2:
+ SpamAssassin moze koristiti Vipul Razor2 mrezu. Recena je
+ komercijalna mreza zatvorenog koda, namijenjena distribuiranom
+ 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
+Description: Zelite li imati spamd servis:
+ SpamAssassin moze biti uvijek aktivan kao spamd servis. U
+ slucaju da imate vec centralno aktivan Amavis, spamd je
+ nepotreban buduci da se SpamAssassin koristi interno unutar
+ Amavis servisa. Koristenje spamd ne utice i ne ubrzava rad
+ Amavis servisa.
+
+Template: spamassassin-cn/runasuser
+Type: select
+Choices: non-root, root
+Default: non-root
+Description: Zelite li spamd pod ovlastima:
+ SpamAssassin spamd servis nije nuzno pokretati pod ovlastima
+ privilegiranog korisnika (root). Ako na sistemu nema korisnika
+ koji koriste SpamAssassin iz komadne linije, bolje ga je ne
+ pokretati pod root ovlastima, vec pod neprivilegiranim
+ korisnikom (non-root).