The Internet Message Access Protocol, in short IMAP, is a text-based network protocol that enables access to e-mails located on a mail server. If you set up your account with IMAP, your e-mail client establishes a connection with the server every time you log in. This connection is maintained for the whole session. During this time you can access individual folders and e-mails whose content can be shown on request. This way all messages and folder structures stay saved on the server until they are deleted. As a result, they can be accessed from anywhere and with numerous clients and always find the same, current database.
The connection between the server and IMAP client is established via TCP/IP on port 143 (with a secure port 993 connection). The client communicates with the mail server via text messages, but doesn’t, however, need direct answers to the commands that have been sent out. In order for the response from the server to be registered at a later stage, the client attaches an identifier to its commands, which the mail server adds to the response. The reply line starts with an asterisk when information is contained. If the reply contains a plus sign at the start, it means the server is expecting additional information about the received command. The response additionally provides information on the success (OK), failure (NO), and syntax errors of the particular IMAP client’s commands.