Previous: 4.4.14.2 POP3
UP:
4.4.14 SMTP |
4.4.14.3 IMAP
.. ( )
| IMAP 4.1 |
| A. |
IMAP 4.1 (INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1, V.Crispin, RFC-2060, December 1996) TCP 143. IMAP 993. IMAP POP-3. - .
| POP3 IMAP ( ). |
IMAP 4.1 . , . , , , CRLF. ( ) , .
. - ( - , A0001, A0002 ..), (tag). . , , , . - , (. ). - (. authenticate). , . "+".
: , , , bad , - .
( ) . , , . .
IMAP 4.1 , , , . .
, , , , "*" .
. .
. , , . , , , . : ok ( ), no ( ) bad ( , , ).
IMAP 4.1 . , "*" "+".
. , . , , .
. .
IMAP 4.1 .
32- , 64- , . , UID, .
, , . [IMAP-DISC].
UID uidvalidity (ok) . UID - , UID .
| UID . IMAP, UID , UID . |
UID . , UID. UID 32- . 1, , , .
UID , . UID , , UID .
, 1. 1 , .
. , , . , .
, . , 287 , 523 , UID 12345, 286 , UID 236 UID.
, . . IMAP 4.1. .
, . "\". (\deleted \seen) , . :
| \seen | |
| \answered | |
| \flagged | "" , |
| \deleted | expunge |
| \draft | (, ). |
| \recent | . , ; \recent. . |
, , . . "\". . ; , .
| \recent . \recent store, . |
. , [RFC-822], . [SMTP], . , IMAP 4.1 copy, . IMAP 4.1 append, , append.
( [RFC-822]). [RFC-822]. [MIME-IMB]. , RFC-822, IMAP 4.1 . .
IMAP 4.1 . . , . bad no .
, . , .
, . , .
, . .

. 4.4.14.2.1. IMAP
(1) C ( OK)
(2) C ( PREAUTH)
(3) ( BYE)
(4) LOGIN AUTHENTICATE
(5) SELECT EXAMINE
(6) CLOSE, SELECT EXAMINE
(7) LOGOUT, ,
IMAP 4.1 . IMAP 4.1 : , , , , NIL.
.
.
: . . , , , .
( CR LF). , . , CRLF. CRLF . , .
7- CR LF, (<">). "" {0}, CRLF.
: , , .
8- [MIME-IMB]. IMAP 4.1 8- , , [CHARSET]. BINARY, . " " - NUL . , BASE64, . CTL .
, , . . () - .
"NIL" - . "" ().
. INBOX , " " ( ). . , .
, "#" . , , USENET "#news", . , comp.mail.misc "#news.comp.mail.misc", "comp.mail.misc" (., ).
UTF-7, [UTF-7]. , UTF-7:
UTF-7, US-ASCII "&" ; , 0x20-0x25 0x27-0x7e. "&" (0x26) "&-". ( 0x00-0x1f, 0x7f-0xff, 16- ) BASE64, [UTF-7]. BASE64 US-ASCII, .
"&" BASE64 "-" US-ASCII. US-ASCII, US-ASCII ( , , 16- , "-"). , , : ~peter/mail/&ZeVnLIqe-/&U,BTFw-
, . , . , , , , (, ), . , . , . , ( EXPUNGE). . , .
( EXPUNGE), . , , . , (1) , , (2) .
, , , 30 . .
, , .
, . , , - . , .
, , FETCH STORE .
, EXPUNGE ( FETCH, STORE SEARCH), EXPUNGE . FETCH, STORE SEARCH, EXPUNGE, . , , FETCH, STORE SEARCH, , , . , ( ) :
FETCH + NOOP + STORE
STORE + COPY + FETCH
COPY + COPY
CHECK + FETCH
, :
FETCH + STORE + SEARCH + CHECK
STORE + COPY + EXPUNGE
IMAP 4.1. , .
: CAPABILITY, NOOP LOGOUT.
: .
: : CAPABILITY.
: OK - ;
BAD - <./p>
CAPABILITY , . CAPABILITY "IMAP 4.1" , OK. . , CAPABILITY . , "AUTH=" , . . , "blurdybloop" "AUTH=XBLURDYBLOOP", "XAUTH=BLURDYBLOOP" "XAUTH=XBLURDYBLOOP".
, .
: C: abcd CAPABILITY
S: * CAPABILITY IMAP 4.1 AUTH=KERBEROS_V4
S: abcd OK CAPABILITY completed
: .
: .
: OK - ;
BAD - ;
NOOP .
, NOOP , . NOOP - .
: C: a002 NOOP
S: a002 OK NOOP completed
. . .
C: a047 NOOP
S: * 22 EXPUNGE
S: * 23 EXISTS
S: * 3 RECENT
S: * 14 FETCH (FLAGS (\Seen \Deleted))
S: a047 OK NOOP completed
: .
: BYE.
: OK - ;
BAD - .
LOGOUT , . BYE, OK, .
: C: A023 LOGOUT
S: * BYE IMAP 4.1 Server logging out
S: A023 OK LOGOUT completed
( )
, AUTHENTICATE LOGIN . IMAP RFC-1731. AUTHENTICATE , LOGIN .
. LOGIN "anonymous". . .
. (CAPABILITY, NOOP LOGOUT), : AUTHENTICATE LOGIN.
: .
: .
| OK | , " "; | |
| NO | : , ; | |
| BAD | , . |
AUTHENTICATE , [IMAP-AUTH]. , . . , AUTHENTICATE NO.
. - "+", BASE64. , BASE64. , , "*". , AUTHENTICATE, BAD.
. , , . CRLF, , CRLF OK . , . , , . - .
. ; - . AUTHENTICATE NO, , AUTHENTICATE, LOGIN. , , LOGIN .
: S: * OK KerberosV4 IMAP4rev1 Server
C: A001 AUTHENTICATE KERBEROS_V4
S: + AmFYig==
C: BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a4DT
+nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd
WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh
S: + or//EoAADZI=
C: DiAF5A4gA+oOIALuBkAAmw==
S: A001 OK Kerberos V4 authentication successful
: , .
: - .
: OK - login , ;
NO - login : ;
BAD - .
LOGIN .
: C: a001 LOGIN SMITH SESAME
S: a001 OK LOGIN completed
" " , -. SELECT EXAMINE "" .
(CAPABILITY, NOOP LOGOUT), " " : SELECT, EXAMINE, CREATE, DELETE, RENAME, SUBSCRIBE, UNSUBSCRIBE, LIST, LSUB, STATUS APPEND.
: .
: : FLAGS, EXISTS, RECENT;
OK: UNSEEN, PERMANENTFLAGS.
: OK - , "";
NO - : , ;
BAD - .
SELECT , , . OK, :
FLAGS - , .
<n> EXISTS .
<n> RECENT \Recent.
OK [UIDVALIDITY <n> ] .
"" OK, .
, FLAGS, OK PERMANENTFLAGS, , .
. . SELECT . , , SELECT , . , OK "[READ-WRITE]".
, , " " OK SELECT "[READ-ONLY]". " " , EXAMINE, . .newsrc , " ".
: C: A142 SELECT INBOX
S: * 172 EXISTS
S: * 1 RECENT
S: * OK [UNSEEN 12] Message 12 is first unseen
S: * OK [UIDVALIDITY 3857529045] UIDs valid
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited
S: A142 OK [READ-WRITE] SELECT completed
: .
: : FLAGS, EXISTS, RECENT;
OK: UNSEEN, PERMANENTFLAGS.
| : | OK | , " " ; |
| NO | , " "; ; ; | |
| BAD | . |
EXAMINE SELECT , , " ". . OK EXAMINE "[READ-ONLY]".
: C: A932 EXAMINE blurdybloop
S: * 17 EXISTS
S: * 2 RECENT
S: * OK [UNSEEN 8] Message 8 is first unseen
S: * OK [UIDVALIDITY 3857529045] UIDs valid
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
S: * OK [PERMANENTFLAGS ()] No permanent flags permitted
S: A932 OK [READ-ONLY] EXAMINE completed
: .
: - .
| OK | ; | |
| NO | : ; | |
| BAD | . |
CREATE . OK , . INBOX , , . NO.
( , LIST), . , , .
- - , , CREATE. , "foo/bar/zap" , "/" , foo/ foo/bar/, .
, , , UID.
: C: A003 CREATE owatagusiam/
S: A003 OK CREATE completed
C: A004 CREATE owatagusiam/blurdybloop
S: A004 OK CREATE completed
: , "/" . "/" , "owatagusiam" "blurdybloop". .
: .
: - .
: OK - ;
NO - : ;
BAD - .
DELETE . OK , . INBOX .
DELETE , . , "foo" "foo.bar" (, "." ), "foo" "foo.bar". , , \Noselect.
, , \Noselect. , \Noselect.
, , UID.
: C: A682 LIST "" *
S: * LIST () "/" blurdybloop
S: * LIST (\Noselect) "/" foo
S: * LIST () "/" foo/bar
S: A682 OK LIST completed
C: A683 DELETE blurdybloop
S: A683 OK DELETE completed
C: A684 DELETE foo
S: A684 NO Name "foo" has inferior hierarchical names
C: A685 DELETE foo/bar
S: A685 OK DELETE Completed
C: A686 LIST "" *
S: * LIST (\Noselect) "/" foo
S: A686 OK LIST completed
C: A687 DELETE foo
S: A687 OK DELETE Completed
C: A82 LIST "" *
S: * LIST () "." blurdybloop
S: * LIST () "." foo
S: * LIST () "." foo.bar
S: A82 OK LIST completed
C: A83 DELETE blurdybloop
S: A83 OK DELETE completed
C: A84 DELETE foo
S: A84 OK DELETE Completed
C: A85 LIST "" *
S: * LIST () "." foo.bar
S: A85 OK LIST completed
C: A86 LIST "" %
S: * LIST (\Noselect) "." foo
S: A86 OK LIST completed
: , .
: - .
| : | OK | ; |
| NO | : , ; | |
| BAD | . |
RENAME . OK , . . NO.
, . , "foo" "zap" "foo/bar" (, "/" ) "zap/bar".
, , UID.
INBOX , . , INBOX . INBOX, INBOX.
: C: A682 LIST "" *
S: * LIST () "/" blurdybloop
S: * LIST (\Noselect) "/" foo
S: * LIST () "/" foo/bar
S: A682 OK LIST completed
C: A683 RENAME blurdybloop sarasoop
S: A683 OK RENAME completed
C: A684 RENAME foo zowie
S: A684 OK RENAME Completed
C: A685 LIST "" *
S: * LIST () "/" sarasoop
S: * LIST (\Noselect) "/" zowie
S: * LIST () "/" zowie/bar
S: A685 OK LIST completed
C: Z432 LIST "" *
S: * LIST () "." INBOX
S: * LIST () "." INBOX.bar
S: Z432 OK LIST completed
C: Z433 RENAME INBOX old-mail
S: Z433 OK RENAME completed
C: Z434 LIST "" *
S: * LIST () "." INBOX
S: * LIST () "." INBOX.bar
S: * LIST () "." old-mail
S: Z434 OK LIST completed
: .
: - .
: OK - ;
NO - : ;
BAD - .
SUBSCRIBE "" "" , LSUB. OK .
SUBSCRIBE, . , .
: , , , "system-alerts") , .
: C: A002 SUBSCRIBE #news.comp.mail.mime
S: A002 OK SUBSCRIBE completed
: .
: - .
: OK - ;
NO - : ;
BAD - .
UNSUBSCRIBE "" "" , LSUB. OK , .
: C: A002 UNSUBSCRIBE #news.comp.mail.mime
S: A002 OK UNSUBSCRIBE completed
: ,
(wildcard).
: LIST.
| : | OK | list ; |
| NO | : list ; | |
| BAD | . |
LIST , . LIST, , .
LIST . , (\Marked \Unmarked) , , 1200 20 .
, (""), , , SELECT. . , . ("") , . , , , . . , , .
- . .
, , . , . , . , .
, UNIX:
| ~smith/Mail/ | foo.* | ~smith/Mail/foo.* |
| Archive/ | % | archive/% |
| #news. | comp.mail.* | #news.comp.mail.* |
| ~smith/Mail/ | /usr/doc/foo | /usr/doc/foo |
| archive/ | ~fred/Mail/* | ~fred/Mail/* |
. , "~smith/Mail" - "/u2/users/smith/Mail", , .
"*" (wildcard), . "%" "*", . "%" , . , , \Noselect. , (wildcard). , UNIX "*" , "/" .
INBOX LIST, INBOX , "INBOX", , .
: C: A101 LIST "" ""
S: * LIST (\Noselect) "/" ""
S: A101 OK LIST Completed
C: A102 LIST #news.comp.mail.misc ""
S: * LIST (\Noselect) "." #news.
S: A102 OK LIST Completed
C: A103 LIST /usr/staff/jones ""
S: * LIST (\Noselect) "/" /
S: A103 OK LIST Completed
C: A202 LIST ~/Mail/ %
S: * LIST (\Noselect) "/" ~/Mail/foo
S: * LIST () "/" ~/Mail/meetings
S: A202 OK LIST completed
: -,
(wildcards).
: : LSUB
| : | OK | ; |
| NO | : ; | |
| BAD | . |
LSUB , "" "". LSUB. LSUB , LIST.
, , . , LSUB \Noselect. , .
: C: A002 LSUB "#news." "comp.mail.*"
S: * LSUB () "." #news.comp.mail.mime
S: * LSUB () "." #news.comp.mail.misc
S: A002 OK LSUB completed
: , .
: : STATUS.
: OK - ;
NO - : ;
BAD - .
STATUS . - ( STATUS \Recent).
STATUS IMAP 4.1 EXAMINE , , .
LIST, STATUS . " ", . , STATUS . , :
| MESSAGES | |
| RECENT | \Recent |
| UIDNEXT | , . , , . UID , . |
| UIDVALIDITY | |
| UNSEEN | , \Seen |
: C: A042 STATUS blurdybloop (UIDNEXT MESSAGES)
S: * STATUS blurdybloop (MESSAGES 231 UIDNEXT 44292)
S: A042 OK STATUS completed
: ,
- ,
- ,
: -
| : | OK | |
| NO | : , /, | |
| BAD |
APPEND . [RFC-822]. 8- . , 8- , 8- APPEND 7-, [MIME-IMB]. , , .
date_time, , , . append - , , APPEND.
, , . , , "[TRYCREATE]" NO. CREATE, , , APPEND.
, . , EXISTS. , APPEND NOOP ( CHECK).
: C: A003 APPEND saved-messages (\Seen) {310}
C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
C: From: Fred Foobar
C: Subject: afternoon meeting
C: To: mooch@owatagu.siam.edu
C: Message-Id:
C: MIME-Version: 1.0
C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
C:
C: Hello Joe, do you think we can meet at 3:30 tomorrow?
C:
S: A003 OK APPEND completed
: APPEND , [SMTP].
" ", , . (CAPABILITY, NOOP LOGOUT), (SELECT, EXAMINE, CREATE, DELETE, RENAME, SUBSCRIBE, UNSUBSCRIBE, LIST, LSUB, STATUS APPEND), : CHECK, CLOSE, EXPUNGE, SEARCH, FETCH, STORE, COPY UID.
: .
: - ;
: OK - ;
BAD - .
CHECK . , (, ). , NOOP.
, CHECK . NOOP, CHECK.
: C: FXXZ CHECK
S: FXXZ OK CHECK Completed
: .
: - .
: OK - , " ";
NO - , ;
BAD - .
CLOSE , \Deleted, " ". EXPUNGE .
, EXAMINE " ".
, SELECT, EXAMINE LOGOUT CLOSE. SELECT, EXAMINE LOGOUT . , CLOSE-LOGOUT CLOSE-SELECT , EXPUNGE-LOGOUT EXPUNGE-SELECT, EXPUNGE ( ).
: C: A341 CLOSE
S: A341 OK CLOSE completed
: .
: : EXPUNGE.
: OK - ;
NO - : (, );
BAD - .
EXPUNGE , \Deleted. OK, EXPUNGE .
: C: A202 EXPUNGE
S: * 3 EXPUNGE
S: * 3 EXPUNGE
S: * 5 EXPUNGE
S: * 8 EXPUNGE
S: A202 OK EXPUNGE completed
: , 3, 4, 7 11 \Deleted. , .
: , [CHARSET]-.
( ).
: : SEARCH.
: OK - ;
NO - : ;
BAD -
SEARCH , . . SEARCH , .
, ( AND) , . , DELETED FROM "SMITH" SINCE 1-Feb-1994 , 1- 1994. (, OR NOT).
[CHARSET] "CHARSET", [CHARSET]. [CHARSET] , . [MIME-IMB] [MIME-HDRS] [RFC-822]/[MIME-IMB] , [CHARSET], US-ASCII. US-ASCII , . [CHARSET], NO ( BAD).
, , , . . .
| < > | , |
| ALL | . AND |
| ANSWERED | \Answered. |
| BCC <> | , BCC . |
| BEFORE <> | , . |
| BODY <> | , . |
| CC <> | , CC . |
| DELETED | \Deleted. |
| DRAFT | \Draft. |
| FLAGGED | c \Flagged. |
| FROM <> | , FROM . |
| HEADER < > <> | , ( [RFC-822]) . |
| KEYWORD <> | . |
| LARGER <n> | [RFC-822] . |
| NEW | , \Recent, \Seen. "(RECENT UNSEEN)". |
| NOT < > | , . |
| OLD | , \Recent. "NOT RECENT" ( "NOT NEW"). |
| ON <> | , . |
| OR < 1> < 2> | , . |
| RECENT | , \Recent. |
| SEEN | , \Seen. |
| SENTBEFORE <> | , , [RFC-822]. |
| SENTON <> | , , [RFC-822] |
| SENTSINCE <> | , , [RFC-822]: . |
| SINCE <> | , . |
| SMALLER <n> | [RFC-822] . |
| SUBJECT <> | , SUBJECT . |
| TEXT <> | , |
| TO <> | , TO. |
| UID < > | , . |
| UNANSWERED | <>, \Answered. |
| UNDELETED | , \Deleted. |
| UNDRAFT | , \Draft. |
| UNFLAGGED | , \Flagged. |
| UNKEYWORD <> | , . |
| UNSEEN | , \Seen. |
: C: A282 SEARCH FLAGGED SINCE 1-Feb-1994 NOT FROM "Smith"
S: * SEARCH 2 84 882
S: A282 OK SEARCH completed
: ,
.
: : FETCH
: OK - ;
NO - : ;
BAD - .
FETCH , . , . , :
ALL : (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE)
BODY BODYSTRUCTURE.
BODY[
The classroom smelled faintly of chalk dust and jasmine — a scent that always seemed to gather around the desks on special mornings. It was the kind of morning that felt carefully aligned, as if the world had arranged itself in preparation for something small but definitive: Teachers Day 2025. The school auditorium, an old brick box softened by banners and hand-painted posters, held an audience that hummed with polite excitement. Parents clustered near the back, their phones held like talismans; students whispered last-minute lines into gloved hands; and the staff sat in a line of folding chairs, modestly arranged, their expressions a blend of curiosity and gentle embarrassment.
Lights dimmed. A hush wrapped the auditorium. The first short, simple and domestic, opened on a sunlit kitchen table where a father — not a teacher by title, but an educator in patience — spread out a child’s essay, circling words in red. The camera lingered on hands: the parent’s, larger and slightly trembling, and the child’s, small and impatient. The narrative voiceover was spare, reading fragments of the essay aloud, so that sentences floated between the action and the audience’s understanding. The piece did not romanticize correction or pressure; instead, it examined the rituals of learning — feedback as conversation, revision as an act of care. Small details accumulated: the way a pencil’s tip wore down, the pattern of tea rings on paper, the hesitant pride that crept into a child’s shoulders when a corrected sentence finally fit.
The final short was the most formally ambitious: a documentary-style portrait of an aging literature teacher preparing for retirement. Shot in cool, desaturated frames, it tracked ritual and memory. Morning classes were punctuated by the teacher’s quiet readings, the way a fallen leaf in the courtyard became a metaphor in an impromptu lesson, the stack of annotated books on a desk like a secret language. Intercut interviews — students, colleagues, a grown former pupil calling from abroad — mapped a topology of influence: not grand gestures but countless small, cumulative acts. The film lingered on artifacts: a faded photocopy of a poem the teacher had introduced decades earlier, a coffee-stained handout with margin notes in two different inks, a voicemail saved on an old phone. The narrative resisted tidy closure; instead it offered a procession: years of classes folded into a single morning, lessons given and returned in echoes. teachers day 2025 uncut triflicks originals s new
When the lights rose, the audience sat in a slow, shifting silence. Some teachers dabbed at their eyes with tissue; others exchanged looks that were equal parts bemusement and gratitude. Immediately after, the film club — a diverse line-up of seniors and grads — took the stage for a Q&A. They spoke unguardedly about process: why they chose “uncut” as both aesthetic and ethical stance, how allowing rough edges preserved authenticity, how the three films were intentionally arranged to trace a triangular argument about teaching as craft, care, and continuity.
Outside, a photographer captured images of teachers holding sympathetic handmade cards; a volunteer handed out tea. The school newsletter promised a feature on the Triflicks Originals project, complete with behind-the-scenes photos and a sidebar about how the film club integrated portfolio assessment into its grading rubric. Administrators took notes, quietly considering budget lines for future media labs. The classroom smelled faintly of chalk dust and
Between the pieces, the club cut to a silent interlude: a title card with a single line — “Uncut” — and then a faint, ambient track. It was an invitation to breathe, a reminder that the three films were meant to be considered together, not as isolated exhibits but as facets of how teaching wove through public and private life.
At the center of the day’s program was a screening billed simply as “Uncut: Triflicks Originals — S New.” The title had circulated in the faculty group chat for weeks, an enigmatic promise that had everyone guessing. The film club had described it to teachers as a curated short: three original shorts stitched together, uncut, each a concentrated study of teaching in different registers. “S New” was the club’s label — a nod to “seasonal newness,” they said, or perhaps a cryptic internal catalog code. Whatever the exact meaning, the promise of unfiltered, student-made storytelling was enough to fill the room. Parents clustered near the back, their phones held
The second short shifted tone sharply — a single-take homage to an after-school robotics club. The camera threaded through a cluttered lab where soldering irons hissed and LEDs blinked like anxious constellations. Dialogue crackled with technical jargon and teenage bravado, but beneath it flowed a steady current of mentorship: a coach who refused to provide answers outright, teachers who set constraints and then watched curiosity do the rest. The film’s strength lay in choreography — the rhythmic clatter of parts, the precise handoffs of tools, the improv solutions born of necessity. It was less about triumphs than about iterative failure: a circuit that refused to close until someone reimagined the problem, a prototype that had to be disassembled three times before it could be explained. Viewers felt the satisfaction of problem-solving as pedagogy, learning as a series of small, stubborn experiments.