SMTP Status Codes
Simple Mail Transfer Protocol (SMTP) is the de facto standard for e-mail transmissions across the Internet. Formally SMTP is defined in RFC 821 as amended by RFC 1123. The protocol used today is also known as ESMTP and defined in RFC 2821. The main role of this article is not to explain SMTP as itself (RFC’s describe this pretty deeply) but provide quick reference to SMTP Reply Codes. An example of basic SMTP communication is also stated here, below table.
| Code | Description |
|---|---|
| 200 | Success (see RFC 876) |
| 211 | System status, or system help reply |
| 214 | Help message |
| 220 | Service ready |
| 221 | Service closing transmission channel |
| 250 | Requested mail action okay, completed |
| 251 | User not local |
| 354 | Start mail input; end with <CRLF>.<CRLF> |
| 421 | Service not available, closing transmission channel |
| 450 | Requested mail action not taken: mailbox unavailable |
| 451 | Requested action aborted: local error in processing |
| 452 | Requested action not taken: insufficient system storage |
| 500 | Syntax error, command unrecognised |
| 501 | Syntax error in parameters or arguments |
| 502 | Command not implemented |
| 503 | Bad sequence of commands |
| 504 | Command parameter not implemented |
| 521 | Domain does not accept mail (see RFC 1846) |
| 530 | Access denied |
| 550 | Requested action not taken: mailbox unavailable |
| 551 | User not local |
| 552 | Requested mail action aborted: exceeded storage allocation |
| 553 | Requested action not taken: mailbox name not allowed |
| 554 | Transaction failed |
Other SMTP Related Documents:
- basic specification (RFC 2821)
- enhanced status codes (RFC 1893 and RFC 2034)
- additional important information (RFC 1123).
Typical SMTP Conversation:
SMTPD: 220 smtp.example.com Service Ready
CLIENT: HELO client.mydomain.com
SMTPD: 250 smtp.example.com
CLIENT: MAIL FROM:<somebody@mydomain.com>
SMTPD: 250 <somebody@mydomain.com> Sender OK
CLIENT: RCPT TO:<mailbox@example.com>
SMTPD: 250 <mailbox@example.com> Recipient OK
CLIENT: DATA
SMTPD: 354 OK Send! End with <CRLF>.<CRLF>
CLIENT:
From: <somebody@mydomain.com>
To: <mailbox@example.com>
Subject: Test
This is just test message to verify SMTP status codes…
<CRLF>
.
<CRLF>
SMTPD: 250 Received OK
CLIENT: QUIT
SMTPD: 221 Goodbye
CLIENT: HELO client.mydomain.com
SMTPD: 250 smtp.example.com
CLIENT: MAIL FROM:<somebody@mydomain.com>
SMTPD: 250 <somebody@mydomain.com> Sender OK
CLIENT: RCPT TO:<mailbox@example.com>
SMTPD: 250 <mailbox@example.com> Recipient OK
CLIENT: DATA
SMTPD: 354 OK Send! End with <CRLF>.<CRLF>
CLIENT:
From: <somebody@mydomain.com>
To: <mailbox@example.com>
Subject: Test
This is just test message to verify SMTP status codes…
<CRLF>
.
<CRLF>
SMTPD: 250 Received OK
CLIENT: QUIT
SMTPD: 221 Goodbye
Tags: networking, smtp
