forked from Silverfish/proton-bridge
fix(GODT-2576): Correctly handle Forwarded messages from Thunderbird
Thunderbird uses `In-Reply-To` with `X-Forwarded-Message-Id` to signal to the SMTP server that it is forwarding a message.
This commit is contained in:
@ -60,6 +60,7 @@ type Message struct {
|
||||
References []string
|
||||
ExternalID string
|
||||
InReplyTo string
|
||||
XForward string
|
||||
}
|
||||
|
||||
type Attachment struct {
|
||||
@ -520,6 +521,9 @@ func parseMessageHeader(h message.Header, allowInvalidAddressLists bool) (Messag
|
||||
case "in-reply-to":
|
||||
m.InReplyTo = regexp.MustCompile("<(.*)>").ReplaceAllString(fields.Value(), "$1")
|
||||
|
||||
case "x-forwarded-message-id":
|
||||
m.XForward = regexp.MustCompile("<(.*)>").ReplaceAllString(fields.Value(), "$1")
|
||||
|
||||
case "references":
|
||||
for _, ref := range strings.Fields(fields.Value()) {
|
||||
for _, ref := range strings.Split(ref, ",") {
|
||||
|
||||
Reference in New Issue
Block a user