---
id: "smtp_reply_code"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["internet"]
langs: ["common"]
quality: 80
url: "https://registry.apicrafter.io/datatype/smtp_reply_code"
---

# SMTP reply code (`smtp_reply_code`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Three-digit code with which a mail server answers an SMTP command (RFC 5321), as in 250 for an accepted command and 550 for a rejected mailbox. The first digit gives the kind of reply, from 2 for success to 5 for a permanent failure. Mail server logs and bounce messages store it, often together with the enhanced status code (smtp_enhanced_status_code). HTTP and FTP codes have the same form, so use the field name or context.

- Personal data (PII): no
- Categories: Internet (internet)
- Countries: global
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^[2-5]\d{2}$
```

## Examples

- `250` — Requested mail action completed
- `354` — Intermediate reply to the DATA command
- `421` — Service shutting down
- `550` — Mailbox unavailable
- `150` (invalid example) — SMTP has no 1xx replies

## Translations

- ru: Код ответа сервера SMTP

## Sources

- doc: <https://www.rfc-editor.org/rfc/rfc5321>

## Quality

Score 80/100. Missing: mapping (Wikidata, Schema.org, ...), detector coverage.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/smtp_reply_code.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/internet/smtp_reply_code.yaml>
