From f0d3c59de9716a150d3160a8916595c36a590a13 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 10 Oct 2004 09:30:30 +0000 Subject: Move cron script below cron.weekly. Add logrotate script. --- amavis/cron.weekly/local-amavis | 11 +++++++++++ amavis/local-amavis | 11 ----------- amavis/logrotate.d/local-amavis | 10 ++++++++++ 3 files changed, 21 insertions(+), 11 deletions(-) create mode 100755 amavis/cron.weekly/local-amavis delete mode 100755 amavis/local-amavis create mode 100644 amavis/logrotate.d/local-amavis diff --git a/amavis/cron.weekly/local-amavis b/amavis/cron.weekly/local-amavis new file mode 100755 index 0000000..703ed13 --- /dev/null +++ b/amavis/cron.weekly/local-amavis @@ -0,0 +1,11 @@ +#!/bin/sh +# +# local amavis cron weekly + +set -e + +if [ -x /usr/bin/archivemail ]; then + for mbox in spam-quarantine spamalert virus-quarantine virusalert; do archivemail -d 30 --delete /var/lib/amavis/mboxes/$mbox; done +fi + +exit 0 diff --git a/amavis/local-amavis b/amavis/local-amavis deleted file mode 100755 index 703ed13..0000000 --- a/amavis/local-amavis +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# -# local amavis cron weekly - -set -e - -if [ -x /usr/bin/archivemail ]; then - for mbox in spam-quarantine spamalert virus-quarantine virusalert; do archivemail -d 30 --delete /var/lib/amavis/mboxes/$mbox; done -fi - -exit 0 diff --git a/amavis/logrotate.d/local-amavis b/amavis/logrotate.d/local-amavis new file mode 100644 index 0000000..838fd3b --- /dev/null +++ b/amavis/logrotate.d/local-amavis @@ -0,0 +1,10 @@ +/var/lib/amavis/mboxes/* { + weekly + missingok + rotate 8 + compress + delaycompress + notifempty + missingok + nocreate +} -- cgit v1.2.3