Ukoliko zelite zadrzati jednu datoteku za konfiguraciju kao sto je
uobicajeno u upstream verziji, i u Debianu prije izdanja 4.0 / etch,
- nemojte koristiti ovaj paket. Ukoliko je prije instalacije amavisd-cn
+ nemojte koristiti ovaj paket. Ukoliko je prije instalacije amavisd-cn
postojala stara datoteka
/etc/amavis/amavisd.conf
/usr/share/amavisd-cn/templates/40-carnet
-- Stara skripta za restart svih kompomenti mta sustava (clamd + amavisd +
- postfix) vise ne bi trebala biti potrebna, ali se jos uvijek moze
- koristiti kao
-
- /etc/init.d/amavisd-cn restart
+- Stara skripta za restart svih kompomenti mta sustava
+ /etc/init.d/amavisd-cn restart (clamd + amavisd + postfix) je izbacena
+ iz paketa.
- Odrzavanje spamassassin bayesian filtera sada dolazi sa Debianovim
paketom i nalazi se u
$virus_admin = "postmaster\@$mydomain";
- -- Ivan Rako <Ivan.Rako@CARNet.hr> Mon, 17 Feb 2014 20:23:17 +0100
+ -- Ivan Rako <Ivan.Rako@CARNet.hr> Fri, 22 Jul 2016 18:07:10 +0200
+amavisd-cn (3:2.10.1~cn0) stable; urgency=low
+
+ * Prva verzija za jessie
+ * Izbacen /etc/init.d/amavisd-cn, koristi se init.d skripte od
+ Debiana
+
+ -- Ivan Rako <Ivan.Rako@CARNet.hr> Fri, 22 Jul 2016 17:44:38 +0200
+
amavisd-cn (3:2.7.1~cn3) stable; urgency=low
* Brisanje svih zaostataka starog crona /etc/cron.daily/amavisd-new
Priority: optional
Maintainer: Ivan Rako <Ivan.Rako@CARNet.hr>
Build-Depends: debhelper (>= 8)
-Standards-Version: 3.9.3
+Standards-Version: 3.9.6
Package: amavisd-cn
Architecture: all
Provides: amavisd-new-cn
-Depends: ${misc:Depends}, postfix, clamav-cn (>= 4:0.97), spamassassin-cn (>= 2:3.2.5-6), debianutils (>= 3.4), carnet-tools-cn (>= 2.8.1), procps, arj | unarj, rar | unrar | unrar-free, zoo, nomarch, cpio, lzop, cabextract, zip, unzip, bzip2
-Pre-Depends: amavisd-new (>= 1:2.7.1-2)
+Depends: ${misc:Depends}, postfix, clamav-cn (>= 4:0.99), spamassassin-cn (>= 2:3.2.5-6), debianutils (>= 3.4), carnet-tools-cn (>= 2.8.1), procps, arj | unarj, rar | unrar | unrar-free, zoo, nomarch, cpio, lzop, cabextract, zip, unzip, bzip2
+Pre-Depends: amavisd-new (>= 1:2.10.1)
Recommends: postfix-cn
Conflicts: libsavi-perl (<< 0.15), bunch-perl-modules-cn
Description: Easy setup for a postfix/amavisd-new/clamav/spamassassin configuration
+++ /dev/null
-#!/bin/sh
-
-# amavisd-cn /etc/init.d/ initscript wrapper for CARNetized amavisd-new
-#
-# Start and stop Amavis, ClamAV and Postfix/Sendmail
-
-### BEGIN INIT INFO
-# Provides: amavisd-cn
-# Required-Start: $local_fs $remote_fs $syslog $named $network $time
-# Required-Stop: $local_fs $remote_fs $syslog $named $network
-# Should-Start:
-# Should-Stop:
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: start and stop Amavis, ClamAV and Postfix/Sendmail
-# Description: wrapper for starting/stopping MTA and related services
-### END INIT INFO
-
-set -e
-
-# options for daemons:
-# name init.d/script user ps name for pgrep -f pidfile, relative to /var/run num-fds last-fd-name
-options='
-clamd clamav-daemon clamav /usr/sbin/clamd clamav/clamd.pid 5 clamav.log
-amavis amavis.amavisd-new amavis amavisd \\(master\\) amavis/amavisd.pid 5 socket
-'
-# note: pgrep -f takes a regexp, and this is shell expanded once, hence \\
-
-start () {
- local daemon IFSOLD name script user psname pidfile num fdname
- daemon="$1"
- IFSOLD="$IFS"
- IFS=" " # tab
- read name script user psname pidfile num fdname <<-EOPTS
- $(echo "$options" | sed 's/ */ /g' | grep ^$daemon)
- EOPTS
- IFS="$IFSOLD"
- /etc/init.d/$script start
- wait_for_fds "$daemon"
-}
-
-stop () {
- local daemon IFSOLD name script user psname pidfile num fdname
- daemon="$1"
- n=10
- IFSOLD="$IFS"
- IFS=" " # tab
- read name script user psname pidfile num fdname <<-EOPTS
- $(echo "$options" | sed 's/ */ /g' | grep ^$daemon)
- EOPTS
- IFS="$IFSOLD"
- /etc/init.d/$script stop
- pkill -u $user -f "$psname" > /dev/null || true
- while pgrep -u $user -f "$psname" > /dev/null && [ "$n" -gt 0 ]
- do
- sleep 1
- n=$(($n-1))
- done
- pkill -9 -u $user -f "$psname" > /dev/null || true
- #pkill -9 -u $user -x "$daemon"
- if pgrep -u $user -f "$psname" > /dev/null; then # still there?
- return 1
- fi
-}
-
-wait_for_fds () {
- # wait until process shows some I/O readiness :)
- local name IFSOLD num sleep maxtry script user psname pidfile fdname
- name="$1"
- [ -z "$name" ] && return 1
- IFSOLD="$IFS"
- IFS=" " # tab
- read name script user psname pidfile num fdname <<-EOPTS
- $(echo "$options" | sed 's/ */ /g' | grep ^$name)
- EOPTS
- IFS="$IFSOLD"
- num=${num:-4}
- sleep=${sleep:-1}
- maxtry=${maxtry:-90}
- if [ -n "$pidfile" ]; then
- pidfile=/var/run/$pidfile
- findpid="[ -f $pidfile ] && cat $pidfile || true"
- else
- findpid="pgrep -u $user -f \"$psname\" -P 1 | head -1"
- fi
-
- # loop the loop the loop
- try=1
- while /bin/true
- do
- sleep $sleep # 1st, give it a chance to run
- pid=`eval $findpid` # 2nd: find it
- if [ ! -z "$pid" ]; then
- count=`ls -1 /proc/$pid/fd 2>/dev/null| wc -l` # 3rd: count all it's worth
- [ "$count" -ge "$num" ] && ls -l /proc/$pid/fd | grep -q $fdname \
- && return # success -- release
- fi
- try=$(($try+1))
- [ "0$try" -ge "0$maxtry" ] && return 1 # no luck this time
- done
-}
-
-# if we're called as amavisd-cn or amavis with start argument,
-# act like one; otherwise, pass the call down
-case "$(basename $0)" in
- amavisd-cn)
- arg="i$1"
- ;;
- amavis)
- if [ "$1" = start ]; then
- arg="i$1"
- else
- arg="$1"
- fi
- ;;
- *)
- arg="$1"
- ;;
-esac
-
-# If there's no diversion, play possum
-[ -x /etc/init.d/amavis.amavisd-new ] || exit 0
-
-mta=postfix
-
-case "$arg" in
- start|stop|restart|reload|force-reload|debug)
- /etc/init.d/amavis.amavisd-new "$arg"
- ;;
-
- istart)
- start clamd
- start amavis
- if [ -x "/etc/init.d/$mta" ]; then
- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d $mta start
- else
- /etc/init.d/$mta start
- fi
- fi
- ;;
-
- istop)
- if [ -x "/etc/init.d/$mta" ]; then
- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d $mta stop
- else
- /etc/init.d/$mta stop
- fi
- fi
- stop amavis
- stop clamd
- ;;
-
- irestart|ireload|iforce-reload)
- $0 stop
- sleep 2
- $0 start
- ;;
-
- *)
- echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
- exit 1
- ;;
-esac
-
-exit 0
-amavisd-cn: postrm-contains-additional-updaterc.d-calls /etc/init.d/amavis
-amavisd-cn: diversion-for-unknown-file etc/init.d/amavis preinst:24
+amavisd-cn: preinst-calls-updaterc.d amavis
+amavisd-cn: postrm-does-not-call-updaterc.d-for-init.d-script etc/init.d/amavis
+amavisd-cn: init.d-script-not-marked-as-conffile etc/init.d/amavis
+amavisd-cn: init.d-script-not-included-in-package etc/init.d/amavis
# Fix missing redirection in cron files for amavisd-new-cronjob
add_redirection /etc/cron.d/amavisd-new
-# Cleanup and finalization
-if dpkg --compare-versions "$2" lt 2:20030616p10-4; then
- update-rc.d -f amavisd remove > /dev/null
- restart_daemon=1
- chown_ahome=1
- # a complicated way to say chmod 750
- dpkg-statoverride --remove $AHOME > /dev/null || true
- dpkg-statoverride --update --add amavis amavis 750 $AHOME
-fi
-
if [ -n "$chown_ahome" ]; then
# might be slow
echo -n "CN: Fixing ownership in /var/*/amavis... "
cp_echo -mailonly "CN: Fixed ownerships in /var/*/amavis."
fi
-# kill naughty pyzor descendants -- XXX needed for 2.4 or not?
-if dpkg --compare-versions "$2" lt 2:20030616p10-7 && \
- pgrep -u amavis -f '/usr/bin/pyzor check' > /dev/null; then
- if [ -x "/etc/init.d/amavisd-cn" ]; then
- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d amavisd-cn stop
- else
- /etc/init.d/amavisd-cn stop
- fi
- fi
- pkill -9 -u amavis -f '/usr/bin/pyzor check' > /dev/null || true
- if [ -x "/etc/init.d/amavisd-cn" ]; then
- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d amavisd-cn start
- else
- /etc/init.d/amavisd-cn start
- fi
- fi
- restart_daemon=
- restart_mta=
-fi
-
-# register for automatic start
-update-rc.d -f amavis remove >/dev/null || true
-update-rc.d amavisd-cn defaults 19 21 >/dev/null
-
-# START AMAVISD
-# about a half of amavisd-cn script is here
-#if [ "$restart_daemon" -a -x /etc/init.d/amavis.amavisd-new ]; then
-# if [ -x "/etc/init.d/amavis.amavisd-new" ]; then
-# if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-# invoke-rc.d amavis.amavisd-new restart
-# else
-# /etc/init.d/amavis.amavisd-new restart
-# fi
-# fi
-#fi
-## always check that the daemons are running
-#if ! wait_for_fds amavis; then
-# if [ -x "/etc/init.d/amavis.amavisd-new" ]; then
-# if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-# invoke-rc.d amavis.amavisd-new start
-# else
-# /etc/init.d/amavis.amavisd-new start
-# fi
-# fi
-# wait_for_fds amavis
-#fi
-#if [ "$restart_mta" ]; then
-# if [ -x "/etc/init.d/$mta" ]; then
-# if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-# invoke-rc.d $mta restart
-# else
-# /etc/init.d/$mta restart
-# fi
-# fi
-#fi
-
restart_daemon="1"
-
-if [ "$restart_daemon" -a -x /etc/init.d/amavisd-cn ]; then
- if [ -x "/etc/init.d/amavisd-cn" ]; then
+if [ "$restart_daemon" -a -x /etc/init.d/amavis ]; then
+ if [ -x "/etc/init.d/amavis" ]; then
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d amavisd-cn restart
+ invoke-rc.d amavis restart
else
- /etc/init.d/amavisd-cn restart
+ /etc/init.d/amavis restart
fi
fi
fi
cp_echo "CN: Deleting virus-mail older than 7 days every day at 04:25 AM"
cp_echo " (can be changed in $CRONTAB)"
fi
-# This script is, hopefully, not needed any more. Hide it.
-## display this message just once... maybe use debconf instead
-#if dpkg --compare-versions "$2" lt "2:20030616p10-4"; then
-# cp_echo ""
-# cp_echo "CN: To stop, start or restart all of the clamav+amavis+mta components,"
-# cp_echo "CN: use the /etc/init.d/amavisd-cn script."
-#fi
+
if [ "$failed" ]; then
cp_echo ""
cp_echo "CN: Services $failed failed to restart!"
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
-if [ "$1" = remove ]; then
- rm -f /etc/init.d/amavis
- dpkg-divert --quiet --package amavisd-cn --remove --rename \
- --divert /etc/init.d/amavis.amavisd-new /etc/init.d/amavis || true
- update-rc.d amavis defaults 19 21 >/dev/null || true
-fi
-
if [ "$1" = purge ]; then
# REMOVING /var/lib/amavis/amavis* and /var/run/amavis
# /var/run/amavis now deleted in /etc/init.d/amavisd
# keeping virusmails until --purge is used
rm -fr /var/lib/amavis/amavis*
- update-rc.d amavisd-cn remove >/dev/null || true
fi
exit 0
+
+#DEBHELPER#
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
-mv_init () {
- echo -n " Renaming to /etc/init.d/amavis.dpkg-old... "
- mv /etc/init.d/amavis /etc/init.d/amavis.dpkg-old
- echo "done."
-}
-
if [ "$1" = install -o "$1" = upgrade ]; then
- dpkg-divert --quiet --package amavisd-cn --rename \
- --divert /etc/init.d/amavis.amavisd-new /etc/init.d/amavis
-
- # link not in package because woody's dpkg behaves strange when it is
- if [ ! -h /etc/init.d/amavis ]; then
- if [ -e /etc/init.d/amavis ]; then
- echo "CN: Found unknown file at /etc/init.d/amavis."
- mv_init
- fi
- #ln -s amavisd-cn /etc/init.d/amavis
- elif ! readlink /etc/init.d/amavis | grep -q '^amavisd-cn$'; then
- # Symlink in place, but does it point to us?
- echo "CN: Shouldn't happen: found strange /etc/init.d/amavis link."
- mv_init
- #ln -s amavisd-cn /etc/init.d/amavis
+ if [ -L /etc/init.d/amavis -a -f /etc/init.d/amavis.amavisd-new ]; then
+ rm -f /etc/init.d/amavis
+ dpkg-divert --quiet --package amavisd-cn --remove --rename \
+ --divert /etc/init.d/amavis.amavisd-new /etc/init.d/amavis || true
+ update-rc.d amavis defaults 19 21 >/dev/null || true
fi
fi
cp-update -r $PKG $master_cf >&-
del_postconf content_filter
echo "Removed postfix configuration for ${PKG}."
- if pgrep -u root -f /usr/lib/postfix/master >&- && \
- [ -x /etc/init.d/postfix ] >&- ; then
+ if [ -x /etc/init.d/postfix ]; then
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d postfix restart
else
+++ /dev/null
-amavisd-cn source: maintainer-script-lacks-debhelper-token debian/postrm
-amavisd-cn source: maintainer-script-lacks-debhelper-token debian/postinst
fi
# START AMAVISD
-if [ "$restart_daemon" -a -x /etc/init.d/amavis.amavisd-new ]; then
- /etc/init.d/amavis.amavisd-new restart
+if [ "$restart_daemon" -a -x /etc/init.d/amavisd-new ]; then
+ /etc/init.d/amavisd-new restart
fi
# always check that the daemons are running
if ! wait_for_fds amavis; then
- /etc/init.d/amavis.amavisd-new start < /dev/null
+ /etc/init.d/amavisd-new start < /dev/null
wait_for_fds amavis
fi
# name init.d/script user ps name for pgrep -f pidfile, relative to /var/run num-fds last-fd-name
options='
clamd clamav-daemon clamav /usr/sbin/clamd clamav/clamd.pid 5 clamav.log
-amavis amavis.amavisd-new amavis amavisd \\(master\\) amavis/amavisd.pid 5 socket
+amavis amavisd-new amavis amavisd \\(master\\) amavis/amavisd.pid 5 socket
'
# note: pgrep -f takes a regexp, and this is shell expanded once, hence \\
-VERSION=2.7.1-1
+VERSION=2.10.1~cn0
POSTTMPLVERSION=3:2.4.2-1
MASTTMPLVERSION=3:2.4.2-1