aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-02-08 01:49:44 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-02-08 01:49:44 +0000
commitc1b7f69001060481212be27196181f5cdcb49095 (patch)
tree474e3cb14ed94af14ed9c347f40d6bbab6832e80 /packages
parent5feaddd49825c31db5d3213a761a9bb19f9f7606 (diff)
downloadpfsense-packages-c1b7f69001060481212be27196181f5cdcb49095.tar.gz
pfsense-packages-c1b7f69001060481212be27196181f5cdcb49095.tar.bz2
pfsense-packages-c1b7f69001060481212be27196181f5cdcb49095.zip
Support for SpamD outlook plugin
Diffstat (limited to 'packages')
-rw-r--r--packages/spamd_db.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/packages/spamd_db.php b/packages/spamd_db.php
index dee4cc6d..62cf3a06 100644
--- a/packages/spamd_db.php
+++ b/packages/spamd_db.php
@@ -57,6 +57,8 @@ if($_GET['action'] or $_POST['action']) {
exec("/usr/local/sbin/spamdb -a {$srcip}");
} else if($action == "delete") {
exec("/usr/local/sbin/spamdb -d {$srcip}");
+ exec("/usr/local/sbin/spamdb -d -T \"<{$srcip}>\"");
+ exec("/usr/local/sbin/spamdb -d -t \"<{$srcip}>\"");
} else if($action == "spamtrap") {
exec("/usr/local/sbin/spamdb -a {$srcip} -T");
} else if($action == "trapped") {
@@ -69,11 +71,27 @@ if($_GET['action'] or $_POST['action']) {
/* spam trap e-mail address */
if($_POST['spamtrapemail'] <> "") {
- mwexec("spamdb -T -a \"<{$_POST['spamtrapemail']}>\"");
+ mwexec("/usr/local/sbin/spamdb -T -a \"<{$_POST['spamtrapemail']}>\"");
mwexec("killall -HUP spamlogd");
$savemsg = $_POST['spamtrapemail'] . " added to spam trap database.";
}
+if($_GET['getstatus'] <> "") {
+ $status = exec("/usr/local/sbin/spamdb | grep \"{$_GET['getstatus']}\"");
+ if(stristr($status, "WHITE") == true) {
+ echo "WHITE";
+ } else if(stristr($status, "TRAPPED") == true) {
+ echo "TRAPPED";
+ } else if(stristr($status, "GREY") == true) {
+ echo "GREY";
+ } else if(stristr($status, "SPAMTRAP") == true) {
+ echo "SPAMTRAP";
+ } else {
+ echo "NOT FOUND";
+ }
+ exit;
+}
+
/* spam trap e-mail address */
if($_GET['spamtrapemail'] <> "") {
$status = exec("spamdb -T -a \"<{$_GET['spamtrapemail']}>\"");