mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +03:00
if an smtp-submitted message has a return-path header, only fail in pedantic mode
some software sends messages with return-path header. for issue #103 by Halyul, thanks for reporting!
This commit is contained in:
parent
d73bda7511
commit
57fc37af22
1 changed files with 2 additions and 2 deletions
|
@ -1819,9 +1819,9 @@ func (c *conn) submit(ctx context.Context, recvHdrFor func(string) string, msgWr
|
|||
// Outgoing messages should not have a Return-Path header. The final receiving mail
|
||||
// server will add it.
|
||||
// ../rfc/5321:3233
|
||||
if header.Values("Return-Path") != nil {
|
||||
if mox.Pedantic && header.Values("Return-Path") != nil {
|
||||
metricSubmission.WithLabelValues("badheader").Inc()
|
||||
xsmtpUserErrorf(smtp.C550MailboxUnavail, smtp.SeMsg6Other0, "message must not have Return-Path header")
|
||||
xsmtpUserErrorf(smtp.C550MailboxUnavail, smtp.SeMsg6Other0, "message should not have Return-Path header")
|
||||
}
|
||||
|
||||
// Add Message-Id header if missing.
|
||||
|
|
Loading…
Reference in a new issue