diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/feed/mail.go | 5 | ||||
-rw-r--r-- | internal/msg/msg.go | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/internal/feed/mail.go b/internal/feed/mail.go index a763ef8..0a8bd10 100644 --- a/internal/feed/mail.go +++ b/internal/feed/mail.go @@ -57,10 +57,13 @@ func (item *item) buildHeader() message.Header { h.SetContentType("multipart/alternative", nil) h.SetAddressList("From", item.fromAddress()) h.SetAddressList("To", item.toAddress()) + h.Set("Message-Id", item.messageId()) h.Set(msg.VersionHeader, version.Version()) h.Set(msg.ReasonHeader, strings.Join(item.reasons, ",")) h.Set(msg.IdHeader, item.id()) - h.Set("Message-Id", item.messageId()) + if item.GUID != "" { + h.Set(msg.GuidHeader, item.GUID) + } { // date date := item.DateParsed() diff --git a/internal/msg/msg.go b/internal/msg/msg.go index c71ddaf..a742a9d 100644 --- a/internal/msg/msg.go +++ b/internal/msg/msg.go @@ -12,6 +12,7 @@ const ( VersionHeader = "X-Feed2Imap-Version" ReasonHeader = "X-Feed2Imap-Reason" IdHeader = "X-Feed2Imap-Item" + GuidHeader = "X-Feed2Imap-Guid" ) type Messages []Message |