From e0900b415622cc17e84b1ed2538665d21270d003 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 4 Sep 2015 13:23:07 +0200 Subject: Delete spamd_verify_to_address.php Not used anywhere, useless dead code. --- config/spamd/spamd_verify_to_address.php | 142 ------------------------------- 1 file changed, 142 deletions(-) delete mode 100644 config/spamd/spamd_verify_to_address.php (limited to 'config') diff --git a/config/spamd/spamd_verify_to_address.php b/config/spamd/spamd_verify_to_address.php deleted file mode 100644 index 504107d3..00000000 --- a/config/spamd/spamd_verify_to_address.php +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/local/bin/php -q - from email addresses */ -for($x=0; isset($current_spamtrap[$x]); $x++) { - $current_spamtrap[$x] = str_replace("<", "", $current_spamtrap[$x]); - $current_spamtrap[$x] = str_replace(">", "", $current_spamtrap[$x]); -} - -/* traverse list and find the dictionary attackers, etc */ -foreach($grey_hosts as $grey) { - if(trim($grey) == "") - continue; - /* clean up and further break down values */ - $grey_lower = strtolower($grey); - $grey_lower = str_replace("<","",$grey_lower); - $grey_lower = str_replace(">","",$grey_lower); - $grey_split = split("\|", $grey_lower); - $email_from = strtolower($grey_split[2]); - $email_to = strtolower($grey_split[3]); - $server_ip = strtolower($grey_split[1]); - if(in_array($server_ip, $current_blacklist)) { - if($debug) - echo "$server_ip already in blacklist.\n"; - continue; - } - if(in_array($email_to, $current_spamtrap)) { - if($email_to) - echo "$email_to already in blacklist.\n"; - continue; - } - if($debug) - echo "Testing $email_from | $email_to \n"; - if (in_array($email_to, $valid_list)) { - if($debug) - echo "$email_to is in the valid list\n"; - } else { - /* spammer picked the wrong person to mess with */ - if($server_ip) { - if($debug) - echo "/usr/local/sbin/spamdb -a $server_ip -t\n"; - exec("/usr/local/sbin/spamdb -d {$server_ip} 2>/dev/null"); - exec("/usr/local/sbin/spamdb -d {$server_ip} -T 2>/dev/null"); - exec("/usr/local/sbin/spamdb -d {$server_ip} -t 2>/dev/null"); - if($debug) - echo "/usr/local/sbin/spamdb -a \"<$email_to>\" -T\n"; - exec("/usr/local/sbin/spamdb -a \"<$email_to>\" -T"); - system("echo $server_ip >> /var/db/blacklist.txt"); - $result = mwexec("/usr/local/sbin/spamdb -a $server_ip -t"); - } else { - if($debug) - echo "Could not locate server ip address."; - } - if($debug) - echo "Script result code: {$result}\n"; - } -} - -mwexec("killall -HUP spamlogd"); - -if($debug) { - echo "\nSearch completed.\n\n"; - echo "Items trapped: "; - system("/usr/local/sbin/spamdb | grep TRAPPED | wc -l"); - echo "Items spamtrapped: "; - system("/usr/local/sbin/spamdb | grep SPAMTRAP | wc -l"); - echo "Items in blacklist.txt: "; - system("/sbin/pfctl -t blacklist -T show | wc -l"); -} - -mwexec("/sbin/pfctl -q -t blacklist -T replace -f /var/db/blacklist.txt"); - -?> -- cgit v1.2.3