1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-06-15 00:05:15 +02:00

UI: Only show number of messages ignored statistics if --ignore-duplicate-ids is set

This commit is contained in:
Ralph Slooten
2024-01-23 16:11:11 +13:00
parent 5271f5226b
commit a31672b6f3
2 changed files with 5 additions and 1 deletions

View File

@ -29,6 +29,9 @@ type webUIConfiguration struct {
// Whether SpamAssassin is enabled // Whether SpamAssassin is enabled
SpamAssassin bool SpamAssassin bool
// Whether messages with duplicate IDs are ignored
DuplicatesIgnored bool
} }
// WebUIConfig returns configuration settings for the web UI. // WebUIConfig returns configuration settings for the web UI.
@ -59,6 +62,7 @@ func WebUIConfig(w http.ResponseWriter, _ *http.Request) {
conf.DisableHTMLCheck = config.DisableHTMLCheck conf.DisableHTMLCheck = config.DisableHTMLCheck
conf.SpamAssassin = config.EnableSpamAssassin != "" conf.SpamAssassin = config.EnableSpamAssassin != ""
conf.DuplicatesIgnored = config.IgnoreDuplicateIDs
bytes, _ := json.Marshal(conf) bytes, _ := json.Marshal(conf)

View File

@ -259,7 +259,7 @@ export default {
{{ formatNumber(mailbox.appInfo.RuntimeStats.SMTPRejected) }} {{ formatNumber(mailbox.appInfo.RuntimeStats.SMTPRejected) }}
</td> </td>
</tr> </tr>
<tr> <tr v-if="mailbox.uiConfig.DuplicatesIgnored">
<td> <td>
SMTP messages ignored SMTP messages ignored
</td> </td>