[Web] Show fuzzy hash of rejected mail, if any

This commit is contained in:
andryyy
2020-10-24 16:27:31 +02:00
parent 6d1c0041f4
commit 0165c9d26b
7 changed files with 35 additions and 5 deletions

View File

@@ -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