📜  SMTP 响应

📅  最后修改于: 2021-09-27 15:02:54             🧑  作者: Mango

简单邮件传输协议 (SMTP) 响应从服务器发送到客户端。 SMTP 中的每个响应都以三位数代码开头,后面可能是附加的文本信息。响应中的前导数字表示响应的类别。以下是不同类别的回复:

1. Positive completion reply
2. Positive Intermediate reply
3. Transient Negative Completion reply 
4. Permanent Negative Completion reply 

这些解释如下:

  1. 积极完成回复 –
    此回复表示成功完成操作。之后可以发起新的请求。
  2. 积极的中级答复 –
    此回复是指接受我们收到的命令,但请求的操作正处于暂停状态,并且还在等待收到进一步的信息。
  3. 瞬态否定完成回复 –
    此回复是指未接受命令且未发生请求的操作。在这种情况下,错误条件是暂时的,并且可能会再次请求操作。

  4. 永久否定完成回复 –
    此回复表示未接受命令且未发生请求的操作。

下表列出了各种 SMTP 响应:

Category Code Description
Positive
Completion
Reply
211 System status and system help reply.
214 Help message.
220 service ready.
221 service closing transmission channel.
250 Requested mail action okay, completed.
251 User not local; the message will be forwarded to .
Positive
Intermediate
Reply
354 Start mail input; end with .

Transient

Negative

Completion

Reply

421 service not available, losing transmission channel.
450 Requested mail action not taken, mailbox not available ( e.g. Mailbox busy ).
451 Requested action aborted; local error in processing.
452 Requested action not taken; insufficient system storage system.
Permanent
Negative
Completion
Reply
500 Syntax error, command unrecognized.
501 Syntax error in parameters or arguments.
502 Command not implemented.
503 Bad sequence of commands.
504 Command parameter not implemented.
550 The requested action is not taken due to the unavailability of mailbox ( e.g. Mailbox not found, no access ).
551 User not local; please try .
552 Requested mail action aborted; exceeded storage allocation.
553 The requested action is not taken because the mailbox name does not allowed it (e.g., Mailbox syntax incorrect.).
554 Transaction failed.