]> source.dussan.org Git - rspamd.git/commitdiff
[WebUI] Display smtp sender/recipient in history 2255/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Tue, 22 May 2018 10:08:15 +0000 (13:08 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Tue, 22 May 2018 10:08:15 +0000 (13:08 +0300)
if it doesn't match From/To..Cc..Bcc

interface/js/app/history.js

index dc44a2ddfe1ec07b96684bcc61d003a3ccbf152f..4fa3d9e078d0a666e607a4bb9fad9341fd98edae 100644 (file)
@@ -171,7 +171,14 @@ function($, _, Humanize) {
                 "value": scan_time
             };
             item.id = item['message-id'];
-            item.rcpt_mime = item.rcpt_mime.join(",&#8203;");
+            if (JSON.stringify(item.rcpt_smtp) !== JSON.stringify(item.rcpt_mime)) {
+                item.rcpt_mime = "[" + item.rcpt_smtp.join(",&#8203;") + "] " + item.rcpt_mime.join(",&#8203;");
+            } else {
+                item.rcpt_mime = item.rcpt_mime.join(",&#8203;");
+            }
+            if (item.sender_mime !== item.sender_smtp) {
+                item.sender_mime = "[" + item.sender_smtp + "] " + item.sender_mime;
+            }
             items.push(item);
         });
 
@@ -225,7 +232,7 @@ function($, _, Humanize) {
                 }
             }, {
                 "name": "sender_mime",
-                "title": "From",
+                "title": "[Envelope From] From",
                 "breakpoints": "xs sm md",
                 "style": {
                     "font-size": "11px",
@@ -233,7 +240,7 @@ function($, _, Humanize) {
                 }
             }, {
                 "name": "rcpt_mime",
-                "title": "To",
+                "title": "[Envelope To] To",
                 "breakpoints": "xs sm md",
                 "style": {
                     "font-size": "11px",