Skip to content

Commit

Permalink
imapserver: add support for RFC822.PEEK
Browse files Browse the repository at this point in the history
  • Loading branch information
emersion committed Dec 8, 2024
1 parent 9c5b158 commit 71399e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions imapserver/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ func handleFetchAtt(dec *imapwire.Decoder, attName string, options *imap.FetchOp
bs := &imap.FetchItemBodySection{}
writerOptions.obsolete[bs] = attName
options.BodySection = append(options.BodySection, bs)
case "RFC822.PEEK": // obsolete, equivalent to BODY.PEEK[], used by Outlook
bs := &imap.FetchItemBodySection{Peek: true}
writerOptions.obsolete[bs] = attName
options.BodySection = append(options.BodySection, bs)
case "RFC822.HEADER": // equivalent to BODY.PEEK[HEADER]
bs := &imap.FetchItemBodySection{
Specifier: imap.PartSpecifierHeader,
Expand Down

0 comments on commit 71399e4

Please sign in to comment.