> For the complete documentation index, see [llms.txt](https://ivalexev.gitbook.io/rednote/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ivalexev.gitbook.io/rednote/utility/service/imap-143-993.md).

# IMAP (143-993)

<details>

<summary>Protocol Information</summary>

IMAP is a protocol used to access email directly from the server, without having to download it. This allows users to synchronize their mail across multiple devices, so that any changes made on one, such as reading or deleting a message, are also visible on the others. IMAP is ideal for those who use multiple devices to manage their email, as all operations take place in real time on the server, keeping a copy of each email accessible from anywhere with an Internet connection. It also supports folder structures.

</details>

## Port

<table data-header-hidden><thead><tr><th width="166">Port</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:green;"><strong>143</strong></mark><strong> TCP</strong></td><td>IMAP (unencrypted)</td></tr><tr><td><mark style="color:green;"><strong>993</strong></mark><strong> TCP</strong></td><td>IMAP (encrypted TLS/SSL) </td></tr></tbody></table>

## Interact

{% code overflow="wrap" %}

```bash
telnet <IP> 143
nc <IP> 143
```

{% endcode %}

{% code overflow="wrap" %}

```bash
openssl s_client -connect <IP>:imaps
openssl s_client -connect <IP>:993 -crlf -quiet
```

{% endcode %}

Commands:

```
  1 LOGIN <USER> <PASS>    Login. User access
  1 LIST "" *              Lists all directories
  1 CREATE "INBOX"         Creates a mailbox with a specified name
  1 DELETE "INBOX"         Delete a mailbox
  1 RENAME "X" "Y"         Rename a mailbox.
  1 SEARCH ALL             To obtain a list of the message IDs in the folder
  1 LSUB "" *              Undo any changes
  1 SELECT INBOX           Select a mailbox so that you can access the messages in it
  1 UNSELECT INBOX         Exits the selected mailbox
  1 FETCH <ID/*> all       Retrieves data associated with a message in the mailbox
  1 FETCH <ID/*> BODY[]    //
  1 CLOSE                  Removes all messages with the Deleted flag set
  1 LOGOUT                 Closes the connection with the IMAP server
```

Or [Connect with Evolution](https://www.youtube.com/watch?v=xelO2CiaSVs).

*If an error indicating “bwrap: Can't create file at ...” is displayed when starting Evolution, use this command to start Evolution:* `export WEBKIT_FORCE_SANDBOX=0 && evolution`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ivalexev.gitbook.io/rednote/utility/service/imap-143-993.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
