diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-07-15 22:09:36 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-07-15 22:09:36 +0000 |
commit | a1f55bfd1e6c354252d75ba4600d3fdc67491f19 (patch) | |
tree | cd7917b743e8fdcd07adbdccb53d87291f9c09d2 /packages/spamd_db.php | |
parent | 9090e16d66ca02ecbd5aadd85b0445b623485e77 (diff) | |
download | pfsense-packages-a1f55bfd1e6c354252d75ba4600d3fdc67491f19.tar.gz pfsense-packages-a1f55bfd1e6c354252d75ba4600d3fdc67491f19.tar.bz2 pfsense-packages-a1f55bfd1e6c354252d75ba4600d3fdc67491f19.zip |
Add SPAMTRAP entry type
Diffstat (limited to 'packages/spamd_db.php')
-rw-r--r-- | packages/spamd_db.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/spamd_db.php b/packages/spamd_db.php index 12c508b0..50ddac0f 100644 --- a/packages/spamd_db.php +++ b/packages/spamd_db.php @@ -100,7 +100,6 @@ if($_POST['spamtrapemail'] <> "") { exec("/usr/local/sbin/spamdb -d {$spamtrapemail}"); exec("/usr/local/sbin/spamdb -d -T \"{$spamtrapemail}\""); exec("/usr/local/sbin/spamdb -d -t \"{$spamtrapemail}\""); - mwexec("/usr/local/sbin/spamdb -T -a \"{$spamtrapemail}\""); exec("/usr/local/sbin/spamdb -T -a '{$toaddress}'"); mwexec("killall -HUP spamlogd"); @@ -338,7 +337,9 @@ if (typeof getURL == 'undefined') { } } } else { + $cmd = "/usr/local/sbin/spamdb | grep \"{$filter}\" | tail -n {$limit}"; + $pkgdb = split("\n", `$cmd`); if(file_exists("/var/db/blacklist.txt")) { $cmd = "cat /var/db/blacklist.txt | grep \"{$filter}\" "; @@ -356,6 +357,7 @@ if (typeof getURL == 'undefined') { $lastseenip = ""; $srcip = "|"; foreach($pkgdb as $pkgdb_row) { + if($rows > $limit) break; $dontdisplay = false; @@ -383,6 +385,13 @@ if (typeof getURL == 'undefined') { */ switch($pkgdb_split[0]) { + case "SPAMTRAP": + $recordtype = htmlentities($pkgdb_split[0]); + $srcip = htmlentities($pkgdb_split[1]); + $fromaddress = htmlentities($pkgdb_split[3]); + $toaddress = htmlentities($pkgdb_split[4]); + $attempts = htmlentities($pkgdb_split[8]); + break; case "TRAPPED": $recordtype = htmlentities($pkgdb_split[0]); $srcip = htmlentities($pkgdb_split[1]); @@ -440,7 +449,7 @@ if (typeof getURL == 'undefined') { <br> <span class="vexpl"><strong><span class="red">Note:</span> Clicking on the action icons will invoke a AJAX query and the page will not refresh. Click refresh in you're browser if you wish to view the changes in status.</strong></span> <br> - <p><font size="-2"><b>Database totals:</b><br><font size="-3"> + <p><font size="-2"><b>Database totals:</b><br><font size="-3"><br> <?php echo " {$whitelist_items} total items in the whitelist.<br>"; echo " {$blacklist_items} total items in the blacklist.<br>"; |