rfc-2034

SMTP Service Extension for Returning Enhanced Error Codes

N. Freed
date1996-10 streamLegacy statusPROPOSED STANDARD pages6 canonicalhttps://www.rfc-editor.org/rfc/rfc2034 doi10.17487/RFC2034
This memo defines an extension to the SMTP service [RFC-821, RFC-1869] whereby an SMTP server augments its responses with the enhanced mail system status codes defined in RFC 1893. [STANDARDS-TRACK]

Extracted elements (11)

design-rationale §5

Client negotiation was intentionally omitted: because SMTP server error code implementation is generally poor, the authors concluded that any improvement toward comprehensible error codes should benefit all clients, extended or not, without requiring a client request.

email

interoperability-note §5

Unlike most SMTP extensions where the client must make an explicit request before the server behaves differently, ENHANCEDSTATUSCODES servers return enhanced codes unconditionally; legacy clients that do not send EHLO still receive the augmented responses.

email

normative-requirement §4 MUST NOT

3xx SMTP responses are explicitly excluded from the requirement to carry enhanced status codes; only 2xx, 4xx, and 5xx responses (outside of greeting and HELO/EHLO) are in scope.

email

normative-requirement §4 MUST

Servers supporting Enhanced-Status-Codes MUST preface the text part of all 2xx, 4xx, and 5xx response lines (except the initial greeting and responses to HELO or EHLO) with a conforming status code.

email

normative-requirement §4 MUST

Servers supporting this extension MUST attach enhanced status codes to their responses regardless of whether the client used EHLO; no client-side negotiation or opt-in is required.

email

normative-requirement §4 MUST

The enhanced status code embedded in a response MUST agree with the primary SMTP response code: a 2xx response must carry a 2.X.X code, 4xx must carry 4.X.X, and 5xx must carry 5.X.X.

email

normative-requirement §5 MUST NOT

The no-negotiation approach used here MUST NOT be taken as a license for future SMTP extensions to change client-server interaction without proper server announcement and a corresponding enabling client command.

email

normative-requirement §4 MUST

When a response spans multiple lines, the same enhanced status code MUST appear at the beginning of the text in each line of the multi-line response.

email

protocol-element §3

The SMTP service extension is named 'Enhanced-Status-Codes' and advertised via the EHLO keyword ENHANCEDSTATUSCODES. No parameters are used with the keyword and no additional SMTP verbs are defined.

email

security-consideration §7

Additional detail in server responses provides additional information about the server that could assist in circumventing server security. Implementors must weigh the benefit of richer error information against the risk of information disclosure.

email, security

wire-format §4

Enhanced status codes have the syntax 'class "." subject "." detail' where class is '2', '4', or '5'; subject is 1–3 digits; and detail is 1–3 digits. The code is always followed by one or more spaces before the response text.

email