1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-05 00:27:25 +00:00

Include remote_host, remote_ip and failure_info with user's received mail details

This commit is contained in:
downtownallday 2021-04-09 07:33:49 -04:00
parent 0ec968c3b6
commit 82e06a6f15
4 changed files with 14 additions and 1 deletions

View File

@ -61,6 +61,7 @@
</template> </template>
<template #row-details="row"> <template #row-details="row">
<b-card> <b-card>
<div><strong>Remote host</strong>: {{ row.item.remote_host }}[{{ row.item.remote_ip }}]</div>
<div><strong>Connection disposition</strong>: {{ disposition_formatter(row.item.disposition) }}</div> <div><strong>Connection disposition</strong>: {{ disposition_formatter(row.item.disposition) }}</div>
<div v-if="row.item.orig_to"><strong>Sent to alias</strong>: {{ row.item.orig_to }}</div> <div v-if="row.item.orig_to"><strong>Sent to alias</strong>: {{ row.item.orig_to }}</div>
<div v-if="row.item.dkim_reason"><strong>Dkim reason</strong>: {{row.item.dkim_reason}}</div> <div v-if="row.item.dkim_reason"><strong>Dkim reason</strong>: {{row.item.dkim_reason}}</div>
@ -68,6 +69,7 @@
<div v-if="row.item.postgrey_reason"><strong>Postgrey reason</strong>: {{row.item.postgrey_reason}}</div> <div v-if="row.item.postgrey_reason"><strong>Postgrey reason</strong>: {{row.item.postgrey_reason}}</div>
<div v-if="row.item.postgrey_delay"><strong>Postgrey delay</strong>: {{received_mail.x_fields.postgrey_delay.formatter(row.item.postgrey_delay)}}</div> <div v-if="row.item.postgrey_delay"><strong>Postgrey delay</strong>: {{received_mail.x_fields.postgrey_delay.formatter(row.item.postgrey_delay)}}</div>
<div v-if="row.item.spam_result"><strong>Spam score</strong>: {{received_mail.x_fields.spam_score.formatter(row.item.spam_score)}}</div> <div v-if="row.item.spam_result"><strong>Spam score</strong>: {{received_mail.x_fields.spam_score.formatter(row.item.spam_score)}}</div>
<div v-if="row.item.failure_info"><strong>Failure info</strong>: {{row.item.failure_info}}</div>
</b-card> </b-card>
</template> </template>
</b-table> </b-table>

View File

@ -137,8 +137,11 @@ Vue.component('panel-user-activity', function(resolve, reject) {
combine_received_mail_fields: function() { combine_received_mail_fields: function() {
// remove these fields // remove these fields
this.received_mail.combine_fields([ this.received_mail.combine_fields([
'remote_host',
'remote_ip',
'dkim_reason', 'dkim_reason',
'dmarc_reason', 'dmarc_reason',
'failure_info',
'postgrey_reason', 'postgrey_reason',
'postgrey_delay', 'postgrey_delay',
'spam_score', 'spam_score',

View File

@ -4,8 +4,10 @@
SELECT SELECT
-- mta_connection -- mta_connection
connect_time, mta_connection.service AS service, sasl_username, disposition, connect_time, mta_connection.service AS service, sasl_username, disposition,
remote_host, remote_ip,
-- mta_accept -- mta_accept
envelope_from, spf_result, dkim_result, dkim_reason, dmarc_result, dmarc_reason, envelope_from, spf_result, dkim_result, dkim_reason, dmarc_result, dmarc_reason,
failure_info,
-- mta_delivery -- mta_delivery
postgrey_result, postgrey_reason, postgrey_delay, spam_score, spam_result, message_size, orig_to postgrey_result, postgrey_reason, postgrey_delay, spam_score, spam_result, message_size, orig_to
FROM mta_accept FROM mta_accept

View File

@ -113,6 +113,8 @@ def user_activity(conn, args):
'connect_time', 'connect_time',
'service', 'service',
'sasl_username', 'sasl_username',
'remote_host',
'remote_ip',
# mta_accept # mta_accept
'envelope_from', 'envelope_from',
@ -122,6 +124,7 @@ def user_activity(conn, args):
'dkim_reason', 'dkim_reason',
'dmarc_result', 'dmarc_result',
'dmarc_reason', 'dmarc_reason',
'failure_info',
# mta_delivery # mta_delivery
'orig_to', 'orig_to',
@ -136,13 +139,16 @@ def user_activity(conn, args):
{ 'type':'datetime', 'format': '%Y-%m-%d %H:%M:%S' },# connect_time { 'type':'datetime', 'format': '%Y-%m-%d %H:%M:%S' },# connect_time
'text/plain', # mta_connection.service 'text/plain', # mta_connection.service
'text/email', # sasl_username 'text/email', # sasl_username
'text/plain', # remote_host
'text/plain', # remote_ip
'text/email', # envelope_from 'text/email', # envelope_from
'text/plain', # disposition 'text/plain', # disposition
'text/plain', # spf_result 'text/plain', # spf_result
'text/plain', # dkim_result 'text/plain', # dkim_result
'text/plain', # dkim_result 'text/plain', # dkim_result
'text/plain', # dmarc_result 'text/plain', # dmarc_result
'text/plain', # dmarc_result 'text/plain', # dmarc_reason
'text/plain', # failure_info
'text/email', # orig_to 'text/email', # orig_to
'text/plain', # postgrey_result 'text/plain', # postgrey_result
'text/plain', # postgrey_reason 'text/plain', # postgrey_reason