[Web] Show fuzzy hash of rejected mail, if any
This commit is contained in:
@@ -63,6 +63,8 @@ if (!empty($_GET['hash']) && ctype_alnum($_GET['hash'])) {
|
||||
$data['score'] = $mailc['score'];
|
||||
// Get rspamd symbols
|
||||
$data['symbols'] = json_decode($mailc['symbols']);
|
||||
// Get fuzzy hashes
|
||||
$data['fuzzy_hashes'] = json_decode($mailc['fuzzy_hashes']);
|
||||
$data['subject'] = $mail_parser->getHeader('subject');
|
||||
(empty($data['subject'])) ? $data['subject'] = '-' : null;
|
||||
echo json_encode($data);
|
||||
@@ -118,6 +120,8 @@ elseif (!empty($_GET['id']) && ctype_alnum($_GET['id'])) {
|
||||
$data['score'] = $mailc['score'];
|
||||
// Get rspamd symbols
|
||||
$data['symbols'] = json_decode($mailc['symbols']);
|
||||
// Get fuzzy hashes
|
||||
$data['fuzzy_hashes'] = json_decode($mailc['fuzzy_hashes']);
|
||||
// Get text/plain content
|
||||
$data['text_plain'] = $mail_parser->getMessageBody('text');
|
||||
// Get html content and convert to text
|
||||
|
@@ -3,7 +3,7 @@ function init_db_schema() {
|
||||
try {
|
||||
global $pdo;
|
||||
|
||||
$db_version = "26092020_2000";
|
||||
$db_version = "24102020_0900";
|
||||
|
||||
$stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
|
||||
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||
@@ -260,6 +260,7 @@ function init_db_schema() {
|
||||
"ip" => "VARCHAR(50)",
|
||||
"action" => "CHAR(20) NOT NULL DEFAULT 'unknown'",
|
||||
"symbols" => "JSON",
|
||||
"fuzzy_hashes" => "JSON",
|
||||
"sender" => "VARCHAR(255) NOT NULL DEFAULT 'unknown'",
|
||||
"rcpt" => "VARCHAR(255)",
|
||||
"msg" => "LONGTEXT",
|
||||
|
Reference in New Issue
Block a user