Search code examples
outlookimap

Append retrieving more than requested 13 bytes


I'm developing a imap service for our company.

Below messages are the logs of communication between MS Outlook 2016 (Windows 10) and my IMAP server.

C:    hj38 APPEND {13}/r/n
S:    + /r/n
C:    한글폴더2
C:     (\Seen \Answered) " 4-Jan-2017 16:42:14 +0900" {14402603}/r/n

The issue I have is {13}. The size of next message should be 13 bytes. But it is bigger than I expected... I'm sure it is more than 13 bytes.

한글폴더2\r\n(\Seen \Answered) " 4-Jan-2017 16:42:14 +0900" {14402603}\r\n 

Solution

  • APPEND takes two mandatory and some optional arguments. In this command there are two optional arguments, so the arguments are, in order:

    • the mailbox name, a 13-byte literal
    • the list of flags, \seen \answered
    • the message date
    • the message content, a 14402603-byte literal.

    Read page 46 of RFC 3501, and the following pages.