diff options
Diffstat (limited to 'packages/spamd_db_ext.php')
-rw-r--r-- | packages/spamd_db_ext.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/spamd_db_ext.php b/packages/spamd_db_ext.php index 88164e60..85edb773 100644 --- a/packages/spamd_db_ext.php +++ b/packages/spamd_db_ext.php @@ -29,6 +29,8 @@ require("config.inc"); +if($_GET['loginname']) + $username = $_GET['loginname']; if($_GET['username']) $username = $_GET['username']; if($_GET['password']) @@ -71,7 +73,7 @@ if($_GET['action'] or $_POST['action']) { usleep(100); exec("/usr/local/sbin/spamdb -a {$srcip}"); mwexec("/sbin/pfctl -q -t blacklist -T replace -f /var/db/blacklist.txt"); - log_error("spamd: {$srcip} has been whitelisted by {$_SERVER['REMOTE_ADDR']}"); + log_error("spamd: {$srcip} has been whitelisted by {$_SERVER['REMOTE_ADDR']} {$loginname}"); hup_spamd(); exit; } else if($action == "delete") { @@ -80,7 +82,7 @@ if($_GET['action'] or $_POST['action']) { hup_spamd(); mwexec("/sbin/pfctl -q -t spamd -T delete $srcip"); mwexec("/sbin/pfctl -q -t blacklist -T replace -f /var/db/blacklist.txt"); - log_error("spamd: {$srcip} has been deleted by {$_SERVER['REMOTE_ADDR']}"); + log_error("spamd: {$srcip} has been deleted by {$_SERVER['REMOTE_ADDR']} {$loginname}"); exit; } else if($action == "spamtrap") { delete_from_spamd_db($email); @@ -88,14 +90,14 @@ if($_GET['action'] or $_POST['action']) { exec("/usr/local/sbin/spamdb -a \"<{$email}>\" -T"); hup_spamd(); mwexec("/sbin/pfctl -q -t blacklist -T add -f /var/db/blacklist.txt"); - log_error("spamd: {$srcip} has been blacklisted by {$_SERVER['REMOTE_ADDR']}"); + log_error("spamd: {$srcip} has been blacklisted by {$_SERVER['REMOTE_ADDR']} {$loginname}"); exit; } else if($action == "trapped") { delete_from_spamd_db($srcip); usleep(100); exec("/usr/local/sbin/spamdb -a {$srcip} -t"); add_to_blacklist($srcip); - log_error("spamd: {$srcip} has been trapped by {$_SERVER['REMOTE_ADDR']}"); + log_error("spamd: {$srcip} has been trapped by {$_SERVER['REMOTE_ADDR']} {$loginname}"); hup_spamd(); exit; } |