# SMTP - Commands

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS红队专家）</strong></a><strong>！</strong></summary>

支持HackTricks的其他方式：

* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或在**Twitter**上关注我们 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>

<figure><img src="/files/Sk2ufgoXhHKAYGBttFiX" alt=""><figcaption></figcaption></figure>

**立即提供的漏洞评估和渗透测试设置**。从任何地方运行完整的渗透测试，具有从侦察到报告的20多种工具和功能。我们不取代渗透测试人员-我们开发定制工具、检测和利用模块，让他们有更多时间深入挖掘、弹出shell并享受乐趣。

{% embed url="<https://pentest-tools.com/>" %}

**命令来源：** [**https://serversmtp.com/smtp-commands/**](https://serversmtp.com/smtp-commands/)

**HELO**\
这是第一个SMTP命令：它启动了标识发件服务器的对话，并通常跟随其域名。

**EHLO**\
启动对话的另一种命令，表明服务器正在使用扩展的SMTP协议。

**MAIL FROM**\
使用此SMTP命令开始操作：发件人在“From”字段中声明源电子邮件地址，并实际开始电子邮件传输。

**RCPT TO**\
它标识电子邮件的收件人；如果有多个收件人，命令将逐个重复地址。

**SIZE**\
此SMTP命令通知远程服务器附加电子邮件的估计大小（以字节为单位）。它还可用于报告服务器接受的消息的最大大小。

**DATA**\
使用DATA命令开始传输电子邮件内容；通常由服务器给出的354回复代码跟随，允许开始实际传输。

**VRFY**\
要求服务器验证特定电子邮件地址或用户名是否实际存在。

**TURN**\
此命令用于在客户端和服务器之间颠倒角色，无需运行新连接。

**AUTH**\
使用AUTH命令，客户端向服务器进行身份验证，提供其用户名和密码。这是另一层安全性，以确保正确的传输。

**RSET**\
它通知服务器正在进行的电子邮件传输将被终止，尽管SMTP对话不会被关闭（与QUIT的情况不同）。

**EXPN**\
此SMTP命令请求确认邮件列表的标识。

**HELP**\
这是客户端请求有助于成功传输电子邮件的一些信息。

**QUIT**\
终止SMTP对话。

<figure><img src="/files/Sk2ufgoXhHKAYGBttFiX" alt=""><figcaption></figcaption></figure>

**立即提供的漏洞评估和渗透测试设置**。从任何地方运行完整的渗透测试，具有从侦察到报告的20多种工具和功能。我们不取代渗透测试人员-我们开发定制工具、检测和利用模块，让他们有更多时间深入挖掘、弹出shell并享受乐趣。

{% embed url="<https://pentest-tools.com/>" %}

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS红队专家）</strong></a><strong>！</strong></summary>

支持HackTricks的其他方式：

* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或在**Twitter**上关注我们 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>


---

# 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://hacktricks.xsx.tw/network-services-pentesting/pentesting-smtp/smtp-commands.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.
