Table 20-1 is a quick reference for the different SMTP response codes. Complete information about these is in RFC 2821. I recommend studying RFC 2821, as it describes every step of the SMTP transaction in detail. You can also see these codes in action during a telnet session, as in Recipe 20.4.
Table 20-2 lists the specific codes.
Table 20-2. Specific codes
Code | Description |
---|
211 | System status or system help reply. |
214 | A help message for a human reader follows. |
220 | <domain> Service ready. |
221 | <domain> Service closing transmission channel. |
250 | Requested mail action okay, completed. |
251 | User not local; will forward to <forward-path>. |
252 | Cannot VRFY user, but will accept message and attempt delivery. |
354 | Start mail input; end with <CRLF>.<CRLF>. |
421 | <domain> Service not available, closing transmission channel. |
450 | Requested mail action not taken: mailbox busy or unavailable. |
451 | Requested action aborted: local error in processing. |
452 | Requested action not taken: mailbox full. |
501 | Syntax error, no parameters allowed. |
502 | Command not implemented. |
503 | Bad sequence of commands. |
504 | Command parameter not implemented. |
521 | <host> does not accept mail. |
530 | Must issue a STARTTLS command first. Encryption required for requested authentication mechanism. |
534 | Authentication mechanism is too weak. |
538 | Encryption required for requested authentication mechanism. |
550 | Requested action not taken: mailbox unavailable. |
551 | User not local; please try <forward-path>. |
552 | Requested mail action aborted: exceeded storage allocation. |
553 | Requested action not taken: mailbox name not allowed. |
554 | Transaction failed. |
Table 20-3 lists the SMTP commands.
Table 20-3. SMTP commands
Command | Description |
---|
HELLO (HELO) | Identifies the sender-SMTP to the receiver-SMTP by hostname. |
MAIL (MAIL) | Identifies the sender, and begins the mail transaction. |
RECIPIENT (RCPT) | The name of the person to whom the message is addressed. |
DATA (DATA) | The message itself, containing the usual elements that you see in a mail client: From, To, Date, CC, Reply-to. |
RESET (RSET) | Aborts the current mail transaction. Any stored sender, recipients, and mail data are discarded, and all buffers and state tables are cleared. The receiver must send an OK reply. |
VERIFY (VRFY) | Asks the receiver to confirm that the recipient has a mailbox on the system. Spammers like to exploit this, so Postfix provides a way to disable it (Recipe Recipe 21.4). |
NOOP (NOOP) | Asks the receiver to send an OK response. |
QUIT (QUIT) | Requests that the receiver send an OK reply and then ends the transmission. |