Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 149 lines (148 sloc) 9.348 kb
f934962 @avsm add in a CSS file and an imap.abnf adapted from the various RFCs
avsm authored
1 address = "(" addr-name SP addr-adl SP addr-mailbox SP addr-host ")"
2 addr-adl = nstring
3 addr-host = nstring
4 addr-mailbox = nstring
5 addr-name = nstring
6 append = "APPEND" SP mailbox [SP flag-list] [SP date-time] SP literal
7 astring = 1*ASTRING-CHAR / string
8 ASTRING-CHAR = ATOM-CHAR / resp-specials
9 atom = 1*ATOM-CHAR
10 ATOM-CHAR = <any CHAR except atom-specials>
11 atom-specials = "(" / ")" / "{" / SP / CTL / list-wildcards / quoted-specials / resp-specials
12 authenticate = "AUTHENTICATE" SP auth-type *(CRLF base64)
13 auth-type = atom
14 base64 = *(4base64-char) [base64-terminal]
15 base64-char = ALPHA / DIGIT / "+" / "/"
16 base64-terminal = (2base64-char "==") / (3base64-char "=")
17 body = "(" ( body-type-1part / body-type-mpart ) ")"
18 body-extension = nstring / number / "(" body-extension *(SP body-extension) ")"
19 body-ext-1part = body-fld-md5 [SP body-fld-dsp [SP body-fld-lang [SP body-fld-loc *(SP body-extension)]]]
20 body-ext-mpart = body-fld-param [SP body-fld-dsp [SP body-fld-lang [SP body-fld-loc *(SP body-extension)]]]
21 body-fields = body-fld-param SP body-fld-id SP body-fld-desc SP body-fld-enc SP body-fld-octets
22 body-fld-desc = nstring
23 body-fld-dsp = "(" string SP body-fld-param ")" / nil
24 body-fld-enc = (DQUOTE ("7BIT" / "8BIT" / "BINARY" / "BASE64"/ "QUOTED-PRINTABLE") DQUOTE) / string
25 body-fld-id = nstring
26 body-fld-lang = nstring / "(" string *(SP string) ")"
27 body-fld-loc = nstring
28 body-fld-lines = number
29 body-fld-md5 = nstring
30 body-fld-octets = number
31 body-fld-param = "(" string SP string *(SP string SP string) ")" / nil
32 body-type-1part = (body-type-basic / body-type-msg / body-type-text) [SP body-ext-1part]
33 body-type-basic = media-basic SP body-fields
34 body-type-mpart = 1*body SP media-subtype [SP body-ext-mpart]
35 body-type-msg = media-message SP body-fields SP envelope SP body SP body-fld-lines
36 body-type-text = media-text SP body-fields SP body-fld-lines
37 capability = ("AUTH=" auth-type) / atom
38 capability-data = "CAPABILITY" *(SP capability) SP "IMAP4rev1" *(SP capability)
39 CHAR8 = %x01-ff
40 command = tag SP (command-any / command-auth / command-nonauth / command-select) CRLF
41 command-any = "CAPABILITY" / "LOGOUT" / "NOOP" / x-command
42 command-auth = append / create / delete / examine / list / lsub / rename / select / status / subscribe / unsubscribe
43 command-nonauth = login / authenticate / "STARTTLS"
44 command-select = "CHECK" / "CLOSE" / "EXPUNGE" / copy / fetch / store / uid / search
45 continue-req = "+" SP (resp-text / base64) CRLF
46 copy = "COPY" SP sequence-set SP mailbox
47 create = "CREATE" SP mailbox
48 date = date-text / DQUOTE date-text DQUOTE
49 date-day = 1*2DIGIT
50 date-day-fixed = (SP DIGIT) / 2DIGIT
51 date-month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec"
52 date-text = date-day "-" date-month "-" date-year
53 date-year = 4DIGIT
54 date-time = DQUOTE date-day-fixed "-" date-month "-" date-year SP time SP zone DQUOTE
55 delete = "DELETE" SP mailbox
56 digit-nz = %x31-39
57 envelope = "(" env-date SP env-subject SP env-from SP env-sender SP env-reply-to SP env-to SP env-cc SP env-bcc SP env-in-reply-to SP env-message-id ")"
58 env-bcc = "(" 1*address ")" / nil
59 env-cc = "(" 1*address ")" / nil
60 env-date = nstring
61 env-from = "(" 1*address ")" / nil
62 env-in-reply-to = nstring
63 env-message-id = nstring
64 env-reply-to = "(" 1*address ")" / nil
65 env-sender = "(" 1*address ")" / nil
66 env-subject = nstring
67 env-to = "(" 1*address ")" / nil
68 examine = "EXAMINE" SP mailbox
69 fetch = "FETCH" SP sequence-set SP ("ALL" / "FULL" / "FAST" / fetch-att / "(" fetch-att *(SP fetch-att) ")")
70 fetch-att = "ENVELOPE" / "FLAGS" / "INTERNALDATE" / "RFC822" [".HEADER" / ".SIZE" / ".TEXT"] / "BODY" ["STRUCTURE"] / "UID" / "BODY" section ["<" number "." nz-number ">"] / "BODY.PEEK" section ["<" number "." nz-number ">"]
71 flag = "\Answered" / "\Flagged" / "\Deleted" / "\Seen" / "\Draft" / flag-keyword / flag-extension
72 flag-extension = "\" atom
73 flag-fetch = flag / "\Recent"
74 flag-keyword = atom
75 flag-list = "(" [flag *(SP flag)] ")"
76 flag-perm = flag / "\*"
77 greeting = "*" SP (resp-cond-auth / resp-cond-bye) CRLF
78 header-fld-name = astring
79 header-list = "(" header-fld-name *(SP header-fld-name) ")"
80 list = "LIST" SP mailbox SP list-mailbox
81 list-mailbox = 1*list-char / string
82 list-char = ATOM-CHAR / list-wildcards / resp-specials
83 list-wildcards = "%" / "*"
84 literal = "{" number "}" CRLF *CHAR8
85 login = "LOGIN" SP userid SP password
86 lsub = "LSUB" SP mailbox SP list-mailbox
87 mailbox = "INBOX" / astring
88 mailbox-data = "FLAGS" SP flag-list / "LIST" SP mailbox-list / "LSUB" SP mailbox-list / "SEARCH" *(SP nz-number) / "STATUS" SP mailbox SP "(" [status-att-list] ")" / number SP "EXISTS" / number SP "RECENT"
89 mailbox-list = "(" [mbx-list-flags] ")" SP (DQUOTE QUOTED-CHAR DQUOTE / nil) SP mailbox
90 mbx-list-flags = *(mbx-list-oflag SP) mbx-list-sflag *(SP mbx-list-oflag) / mbx-list-oflag *(SP mbx-list-oflag)
91 mbx-list-oflag = "\Noinferiors" / flag-extension
92 mbx-list-sflag = "\Noselect" / "\Marked" / "\Unmarked"
93 media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / "MESSAGE" / "VIDEO") DQUOTE) / string) SP media-subtype
94 media-message = DQUOTE "MESSAGE" DQUOTE SP DQUOTE "RFC822" DQUOTE
95 media-subtype = string
96 media-text = DQUOTE "TEXT" DQUOTE SP media-subtype
97 message-data = nz-number SP ("EXPUNGE" / ("FETCH" SP msg-att))
98 msg-att = "(" (msg-att-dynamic / msg-att-static) *(SP (msg-att-dynamic / msg-att-static)) ")"
99 msg-att-dynamic = "FLAGS" SP "(" [flag-fetch *(SP flag-fetch)] ")"
100 msg-att-static = "ENVELOPE" SP envelope / "INTERNALDATE" SP date-time / "RFC822" [".HEADER" / ".TEXT"] SP nstring / "RFC822.SIZE" SP number / "BODY" ["STRUCTURE"] SP body / "BODY" section ["<" number ">"] SP nstring / "UID" SP uniqueid
101 nil = "NIL"
102 nstring = string / nil
103 number = 1*DIGIT
104 nz-number = digit-nz *DIGIT
105 password = astring
106 quoted = DQUOTE *QUOTED-CHAR DQUOTE
107 QUOTED-CHAR = <any TEXT-CHAR except quoted-specials> / "\" quoted-specials
108 quoted-specials = DQUOTE / "\"
109 rename = "RENAME" SP mailbox SP mailbox
110 response = *(continue-req / response-data) response-done
111 response-data = "*" SP (resp-cond-state / resp-cond-bye / mailbox-data / message-data / capability-data) CRLF
112 response-done = response-tagged / response-fatal
113 response-fatal = "*" SP resp-cond-bye CRLF
114 response-tagged = tag SP resp-cond-state CRLF
115 resp-cond-auth = ("OK" / "PREAUTH") SP resp-text
116 resp-cond-bye = "BYE" SP resp-text
117 resp-cond-state = ("OK" / "NO" / "BAD") SP resp-text
118 resp-specials = "]"
119 resp-text = ["[" resp-text-code "]" SP] text
120 resp-text-code = "ALERT" / "BADCHARSET" [SP "(" astring *(SP astring) ")" ] / capability-data / "PARSE" / "PERMANENTFLAGS" SP "(" [flag-perm *(SP flag-perm)] ")" / "READ-ONLY" / "READ-WRITE" / "TRYCREATE" / "UIDNEXT" SP nz-number / "UIDVALIDITY" SP nz-number / "UNSEEN" SP nz-number / atom [SP 1*<any TEXT-CHAR except "]">]
121 search = "SEARCH" [SP "CHARSET" SP astring] 1*(SP search-key)
122 search-key = "ALL" / "ANSWERED" / "BCC" SP astring / "BEFORE" SP date / "BODY" SP astring / "CC" SP astring / "DELETED" / "FLAGGED" / "FROM" SP astring / "KEYWORD" SP flag-keyword / "NEW" / "OLD" / "ON" SP date / "RECENT" / "SEEN" / "SINCE" SP date / "SUBJECT" SP astring / "TEXT" SP astring / "TO" SP astring / "UNANSWERED" / "UNDELETED" / "UNFLAGGED" / "UNKEYWORD" SP flag-keyword / "UNSEEN" / "DRAFT" / "HEADER" SP header-fld-name SP astring / "LARGER" SP number / "NOT" SP search-key / "OR" SP search-key SP search-key / "SENTBEFORE" SP date / "SENTON" SP date / "SENTSINCE" SP date / "SMALLER" SP number / "UID" SP sequence-set / "UNDRAFT" / sequence-set / "(" search-key *(SP search-key) ")"
123 section = "[" [section-spec] "]"
124 section-msgtext = "HEADER" / "HEADER.FIELDS" [".NOT"] SP header-list / "TEXT"
125 section-part = nz-number *("." nz-number)
126 section-spec = section-msgtext / (section-part ["." section-text])
127 section-text = section-msgtext / "MIME"
128 select = "SELECT" SP mailbox
129 seq-number = nz-number / "*"
130 seq-range = seq-number ":" seq-number
131 sequence-set = (seq-number / seq-range) *("," sequence-set)
132 status = "STATUS" SP mailbox SP "(" status-att *(SP status-att) ")"
133 status-att = "MESSAGES" / "RECENT" / "UIDNEXT" / "UIDVALIDITY" / "UNSEEN"
134 status-att-list = status-att SP number *(SP status-att SP number)
135 store = "STORE" SP sequence-set SP store-att-flags
136 store-att-flags = (["+" / "-"] "FLAGS" [".SILENT"]) SP (flag-list / (flag *(SP flag)))
137 string = quoted / literal
138 subscribe = "SUBSCRIBE" SP mailbox
139 tag = 1*<any ASTRING-CHAR except "+">
140 text = 1*TEXT-CHAR
141 TEXT-CHAR = <any CHAR except CRLF>
142 time = 2DIGIT ":" 2DIGIT ":" 2DIGIT
143 uid = "UID" SP (copy / fetch / search / store)
144 uniqueid = nz-number
145 unsubscribe = "UNSUBSCRIBE" SP mailbox
146 userid = astring
147 x-command = "X" atom
148 zone = ("+" / "-") 4DIGIT
Something went wrong with that request. Please try again.