[Pkg-dspam-commits] [pkg-dspam-commits] r263 - in branches/experimental/debian: . patches
Julien Valroff
julien-guest at alioth.debian.org
Wed Aug 18 12:43:56 UTC 2010
Author: julien-guest
Date: Wed Aug 18 12:43:53 2010
New Revision: 263
Log:
Add daily cron job for dspam_notify
Added:
branches/experimental/debian/dspam-webfrontend.cron.daily
Modified:
branches/experimental/debian/dspam.cron.daily
branches/experimental/debian/dspam.default
branches/experimental/debian/patches/009_dspam-notify.diff
branches/experimental/debian/rules
Added: branches/experimental/debian/dspam-webfrontend.cron.daily
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/debian/dspam-webfrontend.cron.daily Wed Aug 18 12:43:53 2010 (r263)
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+RUN_NOTIFY="no"
+
+# Source our config
+[ -f /etc/default/dspam ] && . /etc/default/dspam
+
+case "$RUN_NOTIFY" in
+ [Yy]es)
+ [ -x /usr/bin/dspam_notify ] && /usr/bin/dspam_notify
+ ;;
+ *)
+ exit 0
+ ;;
+esac
+
+exit 0
Modified: branches/experimental/debian/dspam.cron.daily
==============================================================================
--- branches/experimental/debian/dspam.cron.daily Wed Aug 18 10:17:26 2010 (r262)
+++ branches/experimental/debian/dspam.cron.daily Wed Aug 18 12:43:53 2010 (r263)
@@ -3,7 +3,7 @@
MAINTENANCE_OPTIONS=""
# Source our config
-. /etc/default/dspam
+[ -f /etc/default/dspam ] && . /etc/default/dspam
[ -x /usr/bin/dspam_maintenance ] && /usr/bin/dspam_maintenance $MAINTENANCE_OPTIONS
Modified: branches/experimental/debian/dspam.default
==============================================================================
--- branches/experimental/debian/dspam.default Wed Aug 18 10:17:26 2010 (r262)
+++ branches/experimental/debian/dspam.default Wed Aug 18 12:43:53 2010 (r263)
@@ -12,3 +12,7 @@
# Options for dspam_maintenance script (daily cronjob)
# See dspam_maintenance(1) for possible options
MAINTENANCE_OPTIONS="--with-sql-autoupdate --with-sql-optimization"
+
+# Enable the sending of daily spam quarantine summary email
+# Make sure to edit /etc/dspam/dspam_notify.conf before enabling it
+RUN_NOTIFY="no"
Modified: branches/experimental/debian/patches/009_dspam-notify.diff
==============================================================================
--- branches/experimental/debian/patches/009_dspam-notify.diff Wed Aug 18 10:17:26 2010 (r262)
+++ branches/experimental/debian/patches/009_dspam-notify.diff Wed Aug 18 12:43:53 2010 (r263)
@@ -1,12 +1,11 @@
--- a/src/tools/dspam_notify.in
+++ b/src/tools/dspam_notify.in
-@@ -4,35 +4,17 @@
+@@ -4,35 +4,16 @@
use Net::SMTP;
+if (!(-e "/etc/dspam/dspam_notify.conf") || !(-r "/etc/dspam/dspam_notify.conf")) {
-+ print "Missing configuration file: /etc/dspam/dspam_notify.conf";
-+ exit;
++ die("Missing configuration file: /etc/dspam/dspam_notify.conf");
+}
+require "/etc/dspam/dspam_notify.conf";
+
@@ -54,7 +53,7 @@
+$SUBJECT = 'Daily Spam Quarantine Summary';
+
+# What text to display in the body?
-+$BODY = qq!<p>This report has been sent to you from the Anti-Spam service hosted at ISP.com. Below is a list of items in your quarantine area. You can view or release a message by clicking on the links (right). If you no longer wish to receive these reports then you may change the option on the 'Preferences' page.</p>!
++$BODY = qq!<p>This report has been sent to you from the Anti-Spam service hosted at ISP.com. Below is a list of items in your quarantine area. You can view or release a message by clicking on the links (right). If you no longer wish to receive these reports then you may change the option on the 'Preferences' page.</p>!;
+
+# Quarantine URL
+$DSPAM_URL = 'http://localhost';
Modified: branches/experimental/debian/rules
==============================================================================
--- branches/experimental/debian/rules Wed Aug 18 10:17:26 2010 (r262)
+++ branches/experimental/debian/rules Wed Aug 18 12:43:53 2010 (r263)
@@ -130,6 +130,7 @@
dh_installchangelogs -i CHANGELOG
dh_installdocs -i
dh_installman -i
+ dh_installcron -i
dh_compress -i -A
dh_link -i
dh_fixperms -i
More information about the Pkg-dspam-commits
mailing list