aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/spamd_db.php1
-rw-r--r--packages/spamd_db_ext.php2
2 files changed, 3 insertions, 0 deletions
diff --git a/packages/spamd_db.php b/packages/spamd_db.php
index c613e9b5..f779acbc 100644
--- a/packages/spamd_db.php
+++ b/packages/spamd_db.php
@@ -76,6 +76,7 @@ if($_GET['action'] or $_POST['action']) {
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");
}
/* signal a reload for real time effect. */
mwexec("killall -HUP spamlogd");
diff --git a/packages/spamd_db_ext.php b/packages/spamd_db_ext.php
index 6eec5bbd..d931e580 100644
--- a/packages/spamd_db_ext.php
+++ b/packages/spamd_db_ext.php
@@ -172,6 +172,7 @@ function add_to_blacklist($srcip) {
$fd = fopen("/var/db/blacklist.txt", "a");
fwrite($fd, "{$srcip}\n");
fclose($fd);
+ mwexec("/sbin/pfctl -q -t spamd -T add -f /var/db/blacklist.txt");
config_unlock();
}
@@ -184,6 +185,7 @@ function delete_from_blacklist($srcip) {
fwrite($fd, "{$srcip}\n");
}
fclose($fd);
+ mwexec("/sbin/pfctl -q -t spamd -T add -f /var/db/blacklist.txt");
config_unlock();
}