Chapter 3. Anatomy of an IMAP Session

This chapter covers the conceptual middle ground between a layman’s understanding of the IMAP protocol and complete coverage, as contained in RFC 2060 (IMAP4rev1). This chapter will provide enough information to arm you to troubleshoot most IMAP problems and evaluate most clients, but not enough to write your own client or troubleshoot some of the stickiest dilemmas. For those situations, you would be much better off using the RFC 2060 documentation and the RFCs for the extensions your server professes to use.

IMAP Session Concepts

This section covers how a client talks to a server, the details of what an IMAP session looks like, and how we captured that information on our network.

IMAP Is Line-Oriented

You may occasionally see IMAP referred to as a “line-oriented” protocol. All this means is that the conversation between the IMAP client and server is transmitted in the form of character strings that end with CRLF. Line-oriented protocol sessions are easy to follow: a command is sent as a line of text to the server, and the server returns its response as a line of text. Line-oriented protocols are easy to learn and understand for the very same reason.

In fact, commands that make up a line-oriented protocol are frequently so understandable that a user can use the commands to masquerade as an IMAP client. As an example, consider just about anyone with access to a version of telnet that lets you specify the target port. The Telnet protocol, ...

Get Managing IMAP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.