# 143,993 - Pentesting IMAP

Resourcse :&#x20;

* [Hacktricks](https://book.hacktricks.xyz/pentesting/pentesting-imap)
* Atmail [Blog](https://www.atmail.com/blog/imap-101-manual-imap-sessions/).
* second [blog](https://tewarid.github.io/2011/05/10/access-imap-server-from-the-command-line-using-openssl.html).

Internet Message Access Protocol (IMAP)

* **Port 143** - this is the default IMAP non-encrypted port
* **Port 993** - this is the port you need to use if you want to connect using IMAP securely

### FootPrinting

```
sudo nmap <IP> -sV -p110,143,993,995 -sC
curl -k 'imaps://IP' --user user:password -v  #-k By default, every secure connection curl makes is verified to be secure before the transfer takes place. This option makes curl skip the verification step and proceed without checking.
```


---

# Agent Instructions: 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:

```
GET https://staphysec.gitbook.io/staphysec/pentesting/143-993-pentesting-imap.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
