updated layout for webmail

This commit is contained in:
2026-08-15 16:31:27 +01:00
parent f283c90f11
commit 6f0c305367
35 changed files with 2660 additions and 219 deletions
+5 -5
View File
@@ -368,7 +368,7 @@ func (s *Session) Data(r io.Reader) error {
// Privacy default: only headers (and the Subject field, logged separately below
// regardless) go into the admin-visible log, never the message itself — unless this
// sender/IP explicitly opted in via "Store Full Message Content" (storeMessage
// above), or the message was quarantined to Spam for at least one recipient, in
// above), or the message was quarantined to Junk for at least one recipient, in
// which case an admin genuinely needs to see it to judge a spam/abuse report. When
// stored, it's the *entire* raw message (not a plain-text extraction) so the log
// viewer can render the real HTML body, inline images, and attachments — re-parsed
@@ -447,7 +447,7 @@ func (s *Session) deliverLocally(rcpts, types []string, signedContent, messageID
// (DNSBL hit, greylisting, etc.) worth still hard-rejecting at
// SMTP time to avoid backscatter; a bare score threshold hit
// (from either scorer) is quarantined instead of rejected, so a
// false positive is recoverable from the Spam folder rather than
// false positive is recoverable from the Junk folder rather than
// silently bounced with no trace.
if rAction == "reject" {
hardReject = true
@@ -463,14 +463,14 @@ func (s *Session) deliverLocally(rcpts, types []string, signedContent, messageID
continue
}
if quarantine {
folder = "Spam"
folder = "Junk"
spamGated = true
}
}
// Filter rules organize legitimate mail the recipient already trusts arriving
// in their INBOX — a quarantined message skips them entirely and always lands
// in Spam, rather than a rule accidentally routing spam back into view.
// in Junk, rather than a rule accidentally routing spam back into view.
if !spamGated {
action, err := s.backend.Mailstore.ApplyRules(mbox.ID, map[string]string{"from": s.mailFrom, "to": rcpt, "subject": subject})
if err != nil {
@@ -503,7 +503,7 @@ func (s *Session) deliverLocally(rcpts, types []string, signedContent, messageID
}
serverResponse := "Delivered to local mailbox"
if spamGated {
serverResponse = "Quarantined to Spam folder"
serverResponse = "Quarantined to Junk folder"
}
results = append(results, relay.Result{Recipient: rcpt, RecipientType: types[i], Status: "success", ServerResponse: serverResponse, Quarantined: spamGated})
}