aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-03-01 17:34:32 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-03-01 17:34:32 +0000
commit7c168b308a5fe31ee9cb6cad6d4061ce5649609a (patch)
tree2d0fe1b00665d043b0bf1c25b5b6cc1c3c4eaf4f /packages
parente3135b90b814642c8c5bc7925d9425a98aef0183 (diff)
downloadpfsense-packages-7c168b308a5fe31ee9cb6cad6d4061ce5649609a.tar.gz
pfsense-packages-7c168b308a5fe31ee9cb6cad6d4061ce5649609a.tar.bz2
pfsense-packages-7c168b308a5fe31ee9cb6cad6d4061ce5649609a.zip
Remove previous entries before changing status
Diffstat (limited to 'packages')
-rw-r--r--packages/spamd_db_ext.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/spamd_db_ext.php b/packages/spamd_db_ext.php
index 6ed79b03..72bbbe9e 100644
--- a/packages/spamd_db_ext.php
+++ b/packages/spamd_db_ext.php
@@ -82,9 +82,15 @@ if($_GET['action'] or $_POST['action']) {
config_unlock();
exit;
} else if($action == "spamtrap") {
+ exec("/usr/local/sbin/spamdb -d {$srcip}");
+ exec("/usr/local/sbin/spamdb -d -T \"<{$srcip}>\"");
+ exec("/usr/local/sbin/spamdb -d -t \"<{$srcip}>\"");
exec("/usr/local/sbin/spamdb -a {$srcip} -T");
exit;
} else if($action == "trapped") {
+ exec("/usr/local/sbin/spamdb -d {$srcip}");
+ exec("/usr/local/sbin/spamdb -d -T \"<{$srcip}>\"");
+ exec("/usr/local/sbin/spamdb -d -t \"<{$srcip}>\"");
exec("/usr/local/sbin/spamdb -a {$srcip} -t");
exit;
}
@@ -95,6 +101,9 @@ if($_GET['action'] or $_POST['action']) {
/* spam trap e-mail address */
if($_POST['spamtrapemail'] <> "") {
+ exec("/usr/local/sbin/spamdb -d {$_POST['spamtrapemail']}");
+ exec("/usr/local/sbin/spamdb -d -T \"<{$_POST['spamtrapemail']}>\"");
+ exec("/usr/local/sbin/spamdb -d -t \"<{$_POST['spamtrapemail']}>\"");
mwexec("/usr/local/sbin/spamdb -T -a \"<{$_POST['spamtrapemail']}>\"");
mwexec("killall -HUP spamlogd");
$savemsg = $_POST['spamtrapemail'] . " added to spam trap database.";