# enumeration

| **Command**   | **Description**                                                                                                  |
| ------------- | ---------------------------------------------------------------------------------------------------------------- |
| USER username | Identifies the user.                                                                                             |
| PASS password | Authentication of the user using its password.                                                                   |
| STAT          | Requests the number of saved emails from the server.                                                             |
| LIST          | Requests from the server the number and size of all emails.                                                      |
| RETR id       | Requests the server to deliver the requested email by ID.                                                        |
| DELE id       | Requests the server to delete the requested email by ID.                                                         |
| CAPA          | Requests the server to display the server capabilities.                                                          |
| RSET          | Requests the server to reset the transmitted information.                                                        |
| QUIT          | Closes the connection with the POP3 server.                                                                      |
| Reference     | [book.hacktricks.xyz - pentesting-imap](https://book.hacktricks.xyz/network-services-pentesting/pentesting-imap) |
| Reference     | [smtp-commands-reference-auth](https://www.samlogic.net/articles/smtp-commands-reference-auth.htm)               |

## Connect with service

```
telnet "$ip" <port>
```

**Telnet POP3 commands:**

```
curl -k 'imap://"$ip" ' --user user:password -v
```

&#x20;                                       OR

**List all mails**

```
curl -k 'imap://"$ip"/INBOX?ALL' --user user:password -v
```

```
openssl s_client -connect "$ip":pop3s
```
