aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--worker/lib/parse.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/worker/lib/parse.go b/worker/lib/parse.go
index 7e1f36f2..8c1be2a9 100644
--- a/worker/lib/parse.go
+++ b/worker/lib/parse.go
@@ -164,12 +164,15 @@ func parseEnvelope(h *mail.Header) (*models.Envelope, error) {
return nil, err
}
}
+ var irt string
irtList, err := h.MsgIDList("in-reply-to")
if err != nil {
- return nil, err
- }
- irt := ""
- if len(irtList) > 0 {
+ // proper parsing failed, so fall back to whatever is there
+ irt, err = h.Text("in-reply-to")
+ if err != nil {
+ return nil, err
+ }
+ } else if len(irtList) > 0 {
irt = irtList[0]
}
date, err := parseDate(h)