From: Dinko Korunic Date: Wed, 9 Apr 2008 10:05:03 +0000 (+0200) Subject: * Dodavanje redirekcije za /etc/cron.d/amavisd-new (#3315) X-Git-Tag: v2.6.4-1~17 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=12ee5ed01637934e8b2256d8750d48581ab6b595;p=amavisd-cn.git * Dodavanje redirekcije za /etc/cron.d/amavisd-new (#3315) * Minimalni update dokumentacije * Ciscenje i badh* mailova iz karantene u redovnim intervalima --- diff --git a/NEWS.CARNet b/NEWS.CARNet index 89c55f0..0155f9e 100644 --- a/NEWS.CARNet +++ b/NEWS.CARNet @@ -12,8 +12,9 @@ amavisd-cn (3:2.4.2-1) etch; urgency=low /etc/amavis/conf.d/50-user -Za vise detalja pogledajte dokumentaciju u -/usr/share/doc/amavisd-cn/README.CARNet i -/usr/share/doc/amavisd-new/README.Debian +Za vise detalja pogledajte dokumentaciju u: - -- Zoran Dzelajlija Thu, 18 Oct 2007 21:47:49 +0200 + /usr/share/doc/amavisd-cn/README.CARNet + /usr/share/doc/amavisd-new/README.Debian + + -- Ivan Rako Thu, 21 Feb 2008 23:34:59 +0100 diff --git a/README.CARNet b/README.CARNet index f766a28..f6a479c 100644 --- a/README.CARNet +++ b/README.CARNet @@ -1,4 +1,5 @@ amavisd-cn +~~~~~~~~~~ Ovaj paket donosi dodatnu CARNetovu konfiguraciju za pakete amavisd-new i postfix iz Debian distribucije. Komunikacija izmedju postfix MTA i @@ -91,5 +92,4 @@ amavisd-new se obavlja preko smtp protokola, u nacelu na nacin opisan u $virus_admin = "postmaster\@$mydomain"; - -- Zoran Dzelajlija Thu, 18 Oct 2007 21:47:49 +0200 - + -- Ivan Rako Thu, 21 Feb 2008 23:34:59 +0100 diff --git a/TODO b/TODO deleted file mode 100644 index 8c4d895..0000000 --- a/TODO +++ /dev/null @@ -1,16 +0,0 @@ -Critical: -- spamassassin uopce ne radi - -Bugs: -- Radi li SAVI kod prve instalacije? U sargeu nije radio a to - nije mijenjano. - -- get_mx_domain vs. /etc/mailname ... sto ako je /etc/mailname bolja - opcija, kako prepoznati? - -- cron "/usr/sbin/amavisd-new-cronjob sa-sync" javlja - -ERROR: configuration specifies 'use_bayes 0', sa-learn disabled - -Features: -- per-user karantena i istek podataka, uz neki razumni limit na kolicinu diff --git a/changelog.CARNet b/changelog.CARNet index 1f22871..a5ad649 100644 --- a/changelog.CARNet +++ b/changelog.CARNet @@ -1,3 +1,11 @@ +amavisd-cn (3:2.4.2-4) stable; urgency=low + + * Dodavanje redirekcije za /etc/cron.d/amavisd-new (#3315) + * Minimalni update dokumentacije + * Ciscenje i badh* mailova iz karantene u redovnim intervalima + + -- Dinko Korunic Wed, 9 Apr 2008 11:52:21 +0200 + amavisd-cn (3:2.4.2-3) stable; urgency=low * Maknut konflikt sa sweep-cn diff --git a/debian/control b/debian/control index 48af6ef..266e01b 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: amavisd-cn Section: mail Priority: optional -Maintainer: Zoran Dzelajlija +Maintainer: Ivan Rako Build-Depends: debhelper, sed Standards-Version: 3.6.1 diff --git a/debian/cron.d b/debian/cron.d index 0658b2e..5736b8a 100644 --- a/debian/cron.d +++ b/debian/cron.d @@ -1,6 +1,8 @@ -# Deleting temp files from quarantine area every day at 01:35 -35 1 * * * amavis find /var/lib/amavis/ -type d -mtime +1 -name "amavis-milter-*" -print0 | xargs -0 rm -fr -# Deleting virus mails from quarantine area at 03:15 every day -15 3 * * * amavis find /var/lib/amavis/virusmails -type f -mtime +7 -name "virus-*" -print0 | xargs -0 rm -f -# Deleting spam mails from quarantine area every day at 04:25 -25 4 * * * amavis find /var/lib/amavis/virusmails -type f -mtime +7 -name "spam-*" -print0 | xargs -0 rm -f +# Deleting temp files from quarantine area every day at 01:15 +15 1 * * * amavis find /var/lib/amavis/ -type d -mtime +1 -name "amavis-milter-*" -print0 | xargs -0 rm -fr +# Deleting virus mails from quarantine area at 02:15 every day +15 2 * * * amavis find /var/lib/amavis/virusmails -type f -mtime +7 -name "virus-*" -print0 | xargs -0 rm -f +# Deleting spam mails from quarantine area every day at 03:15 +15 3 * * * amavis find /var/lib/amavis/virusmails -type f -mtime +7 -name "spam-*" -print0 | xargs -0 rm -f +# Deleting bah header mails from quarantine area every day at 04:15 +15 4 * * * amavis find /var/lib/amavis/virusmails -type f -mtime +7 -name "badh-*" -print0 | xargs -0 rm -f diff --git a/debian/postinst b/debian/postinst index 0c0ac9f..cdeb66c 100755 --- a/debian/postinst +++ b/debian/postinst @@ -106,6 +106,9 @@ fi # No sysvinit order fixes : +# Fix missing redirection in cron files for amavisd-new-cronjob +add_redirection /etc/cron.d/amavisd-new /etc/cron.daily/amavisd-new + # Cleanup and finalization if dpkg --compare-versions "$2" lt 2:20030616p10-4; then update-rc.d -f amavisd remove > /dev/null diff --git a/src/functions.sh b/src/functions.sh index 6363ac9..57e754f 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -138,3 +138,13 @@ conf_from_template() { restart_daemon=1 changed_config=1 } + +add_redirection() { + until [ -z "$1" ] + do + if [ -e "$1" ] && egrep -q 'amavisd-new-cronjob (sa-sync|sa-clean)$' "$1"; then +sed -i -e 's:\(^.*amavisd-new-cronjob \(sa-sync\|sa-clean\)$\):\1 1>/dev/null 2>\&1:g' "$1" + fi + shift + done +}