aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-04-17 23:09:28 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-04-17 23:09:28 +0000
commit8fa10e549a924194b1997a28449892e117b1c1f3 (patch)
tree1533b86051f9350a0960165a1c2176f8ace9f842
parentae7181a14ad66a20c2c16ec57d4e25653893bcad (diff)
downloadpfsense-packages-8fa10e549a924194b1997a28449892e117b1c1f3.tar.gz
pfsense-packages-8fa10e549a924194b1997a28449892e117b1c1f3.tar.bz2
pfsense-packages-8fa10e549a924194b1997a28449892e117b1c1f3.zip
From the newer man page:
Previous versions of spamd required traps to be entered into the database including the enclosing <> characters; current versions expect only the email address without the enclosing <> characters.
-rw-r--r--packages/spamd_db.php16
-rw-r--r--packages/spamd_db_ext.php4
2 files changed, 10 insertions, 10 deletions
diff --git a/packages/spamd_db.php b/packages/spamd_db.php
index cbaa27bd..987d2948 100644
--- a/packages/spamd_db.php
+++ b/packages/spamd_db.php
@@ -58,28 +58,28 @@ if($_GET['action'] or $_POST['action']) {
/* execute spamdb command */
if($action == "whitelist") {
exec("/usr/local/sbin/spamdb -d {$srcip}");
- exec("/usr/local/sbin/spamdb -d \"<{$srcip}>\" -T");
- exec("/usr/local/sbin/spamdb -d \"<{$srcip}>\" -t");
+ exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -T");
+ exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -t");
delete_from_blacklist($srcip);
mwexec("/sbin/pfctl -q -t blacklist -T replace -f /var/db/blacklist.txt");
exec("echo spamdb -a {$srcip} > /tmp/tmp");
exec("/usr/local/sbin/spamdb -a {$srcip}");
} else if($action == "delete") {
exec("/usr/local/sbin/spamdb -d {$srcip}");
- exec("/usr/local/sbin/spamdb -d \"<{$srcip}>\" -T");
- exec("/usr/local/sbin/spamdb -d \"<{$srcip}>\" -t");
+ exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -T");
+ exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -t");
delete_from_blacklist($srcip);
mwexec("/sbin/pfctl -q -t spamd -T delete $srcip");
mwexec("/sbin/pfctl -q -t blacklist -T replace -f /var/db/blacklist.txt");
} else if($action == "spamtrap") {
exec("/usr/local/sbin/spamdb -d {$srcip}");
- exec("/usr/local/sbin/spamdb -d \"<{$srcip}>\" -T");
- exec("/usr/local/sbin/spamdb -d \"<{$srcip}>\" -t");
+ exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -T");
+ exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -t");
exec("/usr/local/sbin/spamdb -a {$srcip} -T");
} else if($action == "trapped") {
exec("/usr/local/sbin/spamdb -d {$srcip}");
- exec("/usr/local/sbin/spamdb -d \"<{$srcip}>\" -T");
- exec("/usr/local/sbin/spamdb -d \"<{$srcip}>\" -t");
+ exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -T");
+ exec("/usr/local/sbin/spamdb -d \"{$srcip}\" -t");
exec("/usr/local/sbin/spamdb -a {$srcip} -t");
mwexec("/sbin/pfctl -q -t spamd -T add -f /var/db/blacklist.txt");
mwexec("/sbin/pfctl -q -t blacklist -T add -f /var/db/blacklist.txt");
diff --git a/packages/spamd_db_ext.php b/packages/spamd_db_ext.php
index 71bbd41f..087eb793 100644
--- a/packages/spamd_db_ext.php
+++ b/packages/spamd_db_ext.php
@@ -166,8 +166,8 @@ function delete_from_spamd_db($srcip) {
fwrite($fd, "/usr/local/sbin/spamdb -d {$srcip}\n");
fwrite($fd, "/usr/local/sbin/spamdb -d {$srcip} -T\n");
fwrite($fd, "/usr/local/sbin/spamdb -d {$srcip} -t\n");
- fwrite($fd, "/usr/local/sbin/spamdb -d \"<{$srcip}>\" -t\n");
- fwrite($fd, "/usr/local/sbin/spamdb -d \"<{$srcip}>\" -T\n");
+ fwrite($fd, "/usr/local/sbin/spamdb -d \"{$srcip}\" -t\n");
+ fwrite($fd, "/usr/local/sbin/spamdb -d \"{$srcip}\" -T\n");
fclose($fd);
exec("/bin/chmod a+rx /tmp/execcmds");
system("/bin/sh /tmp/execcmds");