Example #1
0
        if (defined('HIDE_HIGH_SPAM') && HIDE_HIGH_SPAM === true && $_SESSION['user_type'] == 'U') {
            $sql .= "\n    AND\n     ishighspam=0\n    AND\n     COALESCE(ishighmcp,0)=0";
        }
        $sql .= "\nORDER BY\n date DESC, time DESC";
        db_colorised_table($sql, __('folder08') . ': ' . translateQuarantineDate($dir, DATE_FORMAT), true, true);
    } else {
        // SECURITY: trim off any potential nasties
        $dir = preg_replace('[\\.|\\.\\.|\\/]', '', $dir);
        $items = quarantine_list($dir);
        // Build list of message id's to be used in SQL statement
        if (count($items) > 0) {
            $msg_ids = join($items, ",");
            $date = mysql_real_escape_string(translateQuarantineDate($dir, 'sql'));
            $sql = "\n  SELECT\n   id AS id2,\n   DATE_FORMAT(timestamp, '" . DATE_FORMAT . " " . TIME_FORMAT . "') AS datetime,\n   from_address,";
            if (defined('DISPLAY_IP') && DISPLAY_IP) {
                $sql .= "clientip,";
            }
            $sql .= "\n   to_address,\n   subject,\n   size,\n   sascore,\n   isspam,\n   ishighspam,\n   spamwhitelisted,\n   spamblacklisted,\n   virusinfected,\n   nameinfected,\n   otherinfected,\n   report,\n   ismcp,\n   ishighmcp,\n   issamcp,\n   mcpwhitelisted,\n   mcpblacklisted,\n   mcpsascore,\n   '' as status\n  FROM\n   maillog\n  WHERE\n   " . $_SESSION['global_filter'] . "\n  AND\n   date = '{$date}'\n  AND\n   BINARY id IN ({$msg_ids})";
            // Hide high spam/mcp from regular users if enabled
            if (defined('HIDE_HIGH_SPAM') && HIDE_HIGH_SPAM === true && $_SESSION['user_type'] == 'U') {
                $sql .= "\n    AND\n     ishighspam=0\n    AND\n     COALESCE(ishighmcp,0)=0";
            }
            $sql .= "\n  ORDER BY\n   date DESC, time DESC\n  ";
            db_colorised_table($sql, __('folder_0208') . ': ' . translateQuarantineDate($dir), true, true);
        } else {
            echo "No quarantined messages found\n";
        }
    }
}
html_end();
dbclose();
Example #2
0
 * your version of the program, but you are not obligated to do so.
 * If you do not wish to do so, delete this exception statement from your version.
 *
 * As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
 * as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
 * JpGraph.
 *
 * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
require_once __DIR__ . '/functions.php';
session_start();
require __DIR__ . '/login.function.php';
html_start("Mail Queue Viewer", 0, false, false);
switch ($_GET['queue']) {
    case "inq":
        $queue = 'inq';
        $display = 'Inbound Mail Queue';
        break;
    case "outq":
        $queue = 'outq';
        $display = 'Outbound Mail Queue';
        break;
    default:
        die("No queue specified\n");
}
db_colorised_table("\n    SELECT\n     id AS id2,\n     CONCAT(DATE_FORMAT(cdate, '" . DATE_FORMAT . "'),' ',ctime) AS datetime,\n hostname,\n from_address,\n to_address,\n subject,\n message,\n size,\n attempts,\n CASE WHEN lastattempt=0 THEN '00:00:00' ELSE SEC_TO_TIME((UNIX_TIMESTAMP() - lastattempt)) END AS lastattempt\nFROM\n " . $queue . "\nWHERE\n " . $_SESSION['global_filter'] . "\nORDER BY\n cdate, ctime", $display, true, true);
// Add the footer
html_end();
// close the connection to the Database
dbclose();
Example #3
0
// Include of necessary functions
require_once __DIR__ . '/functions.php';
require_once __DIR__ . '/filter.inc';
// Authentication checking
session_start();
require __DIR__ . '/login.function.php';
// add the header information such as the logo, search, menu, ....
$filter = html_start("Message Listing", 0, false, true);
// Checks to see if you are looking for quarantined files only
if (QUARANTINE_USE_FLAG) {
    $flag_sql = "quarantined=1";
} else {
    $flag_sql = "1=1";
}
// SQL query
$sql = "\n SELECT\n  id AS id2,\n  DATE_FORMAT(timestamp, '" . DATE_FORMAT . " " . TIME_FORMAT . "') AS datetime,\n  from_address,";
if (defined('DISPLAY_IP') && DISPLAY_IP) {
    $sql .= "clientip,";
}
$sql .= "\n  to_address,\n  subject,\n  size,\n  isspam,\n  ishighspam,\n  isrblspam,\n  spamwhitelisted,\n  spamblacklisted,\n  virusinfected,\n  nameinfected,\n  otherinfected,\n  sascore,\n  report,\n  ismcp,\n  ishighmcp,\n  mcpwhitelisted,\n  mcpblacklisted,\n  mcpsascore,\n  '' AS status\n FROM\n  maillog\n WHERE\n  {$flag_sql}\n" . $_SESSION["filter"]->CreateSQL();
// Hide high spam/mcp from regular users if enabled
if (defined('HIDE_HIGH_SPAM') && HIDE_HIGH_SPAM === true && $_SESSION['user_type'] == 'U') {
    $sql .= "\n    AND\n     ishighspam=0\n    AND\n     COALESCE(ishighmcp,0)=0";
}
$sql .= "\n ORDER BY\n  date DESC, time DESC\n";
// function to display the data from functions.php
db_colorised_table($sql, 'Message Operations', true, true, "SPAM");
// Add footer
html_end();
// Close any open db connections
dbclose();
Example #4
0
$sql .= "\n  to_address,\n  subject,\n  size,\n  isspam,\n  ishighspam,\n  isrblspam,\n  spamwhitelisted,\n  spamblacklisted,\n  virusinfected,\n  nameinfected,\n  otherinfected,\n  sascore,\n  report,\n  ismcp,\n  ishighmcp,\n  mcpwhitelisted,\n  mcpblacklisted,\n  mcpsascore,\n  '' AS status\n FROM\n  maillog\n WHERE\n" . $_SESSION['global_filter'];
// Hide high spam/mcp from regular users if enabled
if (defined('HIDE_HIGH_SPAM') && HIDE_HIGH_SPAM && $_SESSION['user_type'] == 'U') {
    $sql .= "\n    AND\n     ishighspam=0\n    AND\n     ishighmcp=0";
}
// Check if we've passed in a relay that we want to check the headers for, this is from detail.php
$relay_regex = "";
if (isset($_GET['relay'])) {
    if (preg_match('/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$/', $_GET['relay'])) {
        $relay_regex = "[[:<:]]" . str_replace('.', '\\.', $_GET['relay']) . "[[:>:]]";
    }
}
if (strlen($relay_regex) > 0) {
    $sql .= " AND headers REGEXP '{$relay_regex}'";
    if (isset($_GET['isspam'])) {
        $sql .= " AND isspam > 0";
    }
    if (isset($_GET['isvirus'])) {
        $sql .= " AND virusinfected > 0";
    }
    $sql .= " AND " . $_SESSION['global_filter'];
} else {
    $sql .= " " . $_SESSION["filter"]->CreateSQL();
}
$sql .= "\n  ORDER BY\n   date DESC, time DESC\n ";
// function to display the data from functions.php
db_colorised_table($sql, 'Message Listing', true, true);
// Add footer
html_end();
// Close any open db connections
dbclose();
Example #5
0
$sql .= "\n  to_address,\n  subject,\n  size,\n  isspam,\n  ishighspam,\n  isrblspam,\n  spamwhitelisted,\n  spamblacklisted,\n  virusinfected,\n  nameinfected,\n  otherinfected,\n  sascore,\n  report,\n  ismcp,\n  ishighmcp,\n  mcpwhitelisted,\n  mcpblacklisted,\n  mcpsascore,\n  '' AS status\n FROM\n  maillog\n WHERE\n" . $_SESSION['global_filter'];
// Hide high spam/mcp from regular users if enabled
if (defined('HIDE_HIGH_SPAM') && HIDE_HIGH_SPAM && $_SESSION['user_type'] == 'U') {
    $sql .= "\n    AND\n     ishighspam=0\n    AND\n     ishighmcp=0";
}
// Check if we've passed in a relay that we want to check the headers for, this is from detail.php
$relay_regex = "";
if (isset($_GET['relay'])) {
    if (preg_match('/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$/', $_GET['relay'])) {
        $relay_regex = "[[:<:]]" . str_replace('.', '\\.', $_GET['relay']) . "[[:>:]]";
    }
}
if (strlen($relay_regex) > 0) {
    $sql .= " AND headers REGEXP '{$relay_regex}'";
    if (isset($_GET['isspam'])) {
        $sql .= " AND isspam > 0";
    }
    if (isset($_GET['isvirus'])) {
        $sql .= " AND virusinfected > 0";
    }
    $sql .= " AND " . $_SESSION['global_filter'];
} else {
    $sql .= " " . $_SESSION["filter"]->CreateSQL();
}
$sql .= "\n  ORDER BY\n   date DESC, time DESC\n ";
// function to display the data from functions.php
db_colorised_table($sql, __('messagelisting13'), true, true);
// Add footer
html_end();
// Close any open db connections
dbclose();
Example #6
0
 PEAR library that are licensed under the PHP License. If you modify this program, you may extend this exception to
 your version of the program, but you are not obligated to do so.
 If you do not wish to do so, delete this exception statement from your version.

 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
require_once "./functions.php";
session_start();
require 'login.function.php';
$refresh = html_start(__('recentmsg05'), STATUS_REFRESH, false, false);
$sql = "\nSELECT\n id AS id2,\n hostname AS host,\n DATE_FORMAT(timestamp, '" . DATE_FORMAT . " " . TIME_FORMAT . "') AS datetime,\n from_address,";
if (defined('DISPLAY_IP') && DISPLAY_IP) {
    $sql .= "clientip,";
}
$sql .= "\n to_address,\n subject,\n size as size,\n isspam,\n ishighspam,\n spamwhitelisted,\n spamblacklisted,\n virusinfected,\n nameinfected,\n otherinfected,\n sascore,\n report,\n ismcp,\n issamcp,\n ishighmcp,\n mcpsascore,\n '' AS status\nFROM\n maillog\nWHERE\n " . $_SESSION['global_filter'];
// Hide high spam/mcp from regular users if enabled
if (defined('HIDE_HIGH_SPAM') && HIDE_HIGH_SPAM && $_SESSION['user_type'] == 'U') {
    $sql .= "\n    AND\n     ishighspam=0\n    AND\n     ishighmcp=0";
}
$sql .= "  \nORDER BY\n date DESC,\n time DESC\nLIMIT " . MAX_RESULTS;
db_colorised_table($sql, __('last05') . " " . MAX_RESULTS . " " . __('messages05') . " (" . __('refevery05') . " {$refresh} " . __('seconds05') . ")");
// Add footer
html_end();
// Close any open db connections
dbclose();