duesee / imap-codec

Rock-solid and complete codec for IMAP
Apache License 2.0
35 stars 13 forks source link

feat: Implement `BINARY` #444

Closed duesee closed 4 months ago

duesee commented 4 months ago

See IMAP4 Binary Content Extension, Collected Extensions to IMAP4 ABNF, and IMAP4 Non-synchronizing Literals.

Note: BINARY and LITERAL+ can both be used. ~{123+}\r\n is valid, too.

TODO

literal8 = "~{" number "}" CRLF *OCTET
append /= "APPEND" SP mailbox [SP flag-list] [SP date-time] SP literal8
fetch-att =/ "BINARY" [".PEEK"] section-binary [partial] /
             "BINARY.SIZE" section-binary

section-binary = "[" [section-part] "]"

partial = "<" number "." nz-number ">"
msg-att-static =/ "BINARY" section-binary SP (nstring / literal8) /
                  "BINARY.SIZE" section-binary SP number
resp-text-code =/ "UNKNOWN-CTE"

Notes