SMTP replies and status codes
Karta uses enhanced status codes (RFC 3463) everywhere. This page lists the replies its SMTP listeners send, and the codes it records for deliveries when it decides without a reply from the receiving server.
Replies of the SMTP listeners
<host> is the listener's host name (KARTA_SMTP_HOSTNAME).
Success
| Reply | When |
|---|---|
220 <host> ESMTP | greeting |
250 <host> and the extension list | HELO, EHLO |
220 2.0.0 Ready to start TLS | STARTTLS |
235 2.7.0 Authentication successful | AUTH |
250 2.1.0 OK | MAIL FROM |
250 2.1.5 OK | RCPT TO |
354 End data with <CR><LF>.<CR><LF> | DATA |
250 2.0.0 <n> octets received | a BDAT chunk that is not the last |
250 2.0.0 OK queued as <message id> | the message is stored and queued |
250 2.0.0 OK | RSET, NOOP |
252 2.5.0 Cannot VRFY user, but will accept message and attempt delivery | VRFY |
214 2.0.0 See https://www.rfc-editor.org/rfc/rfc5321 | HELP |
221 2.0.0 Bye | QUIT |
334 ... | an AUTH challenge |
Temporary failures (4xx)
| Reply | When |
|---|---|
421 4.7.0 Too many connections, try again later | per-client connection or rate limit |
421 4.7.0 Too many errors, closing connection | 10 protocol errors |
421 4.7.0 Too many rejected commands, closing connection | 20 policy rejections |
421 4.7.0 Too many authentication failures | 3 failed AUTH attempts |
421 4.4.2 <host> Error: timeout exceeded | idle too long |
421 4.4.2 Connection time limit exceeded | the connection lived 1 hour |
421 4.3.2 <host> Service shutting down | the node is stopping |
450 4.7.1 Sending rate limit exceeded, try again later | the SMTP credential's limit |
451 4.3.0 Temporary storage failure, try again later | the message could not be stored |
451 4.3.0 Temporary failure, try again later | the database failed |
451 4.3.2 System not accepting network messages | mx listener: the recipient-domain cache is not loaded |
452 4.5.3 Too many recipients | more than 100 recipients, or another server's recipient on the mx listener |
454 4.7.0 Temporary authentication failure | the credential store is unavailable |
Permanent failures (5xx)
| Reply | When |
|---|---|
500 5.5.2 Command unrecognized | unknown command |
500 5.5.2 Bare <CR> or <LF> not allowed | a command line with a bare CR or LF |
500 5.5.2 Line too long | a command line over 2048 bytes; the connection is closed |
501 5.5.4 Syntax error in parameters or arguments | |
501 5.5.4 Invalid domain name | an invalid HELO/EHLO name on a submission listener |
501 5.5.4 Invalid SIZE | |
501 5.5.4 Invalid parameter value | |
501 5.5.4 Invalid BDAT command, closing connection | |
501 5.5.2 Invalid base64 | in an AUTH exchange |
501 5.0.0 Authentication cancelled | the client sent * |
502 5.5.1 Command not implemented | EXPN; AUTH on the mx listener; STARTTLS without a certificate |
503 5.5.1 Send EHLO first, Send HELO/EHLO first | |
503 5.5.1 Nested MAIL command, Need MAIL command, Need MAIL and RCPT first, Bad sequence of commands, TLS already active | commands out of order |
504 5.5.4 Unrecognized authentication type | |
530 5.7.0 Must issue a STARTTLS command first | AUTH before TLS; or MAIL FROM from an IP range that requires TLS on a plain connection |
530 5.7.0 Authentication required | MAIL FROM before AUTH on a submission listener, from an address in no range |
530 5.7.10 REQUIRETLS needs a TLS connection | |
535 5.7.8 Authentication credentials invalid | wrong user name or password |
550 5.7.1 Sender address not permitted | envelope sender not at a verified domain |
550 5.7.1 From or Sender address not permitted | author not at a verified domain |
550 5.6.0 Message has no From field | also: has more than one From field, From is not a valid mailbox list, has more than one Sender field, Sender is not a valid mailbox, A From field with several mailboxes needs a Sender field |
550 5.7.1 Sending is suspended for this server | |
550 5.7.1 Credential revoked | |
550 5.6.7 Non-ASCII address requires SMTPUTF8 | on MAIL FROM (553 on RCPT TO) |
550 5.1.1 Recipient address rejected | mx listener: no route for the address; an invalid SRS address or return path |
550 5.1.2 Recipient domain not served here | mx listener: no route for the recipient's domain |
550 5.2.1 Return path has expired | mx listener: a VERP return path older than KARTA_BOUNCE_MAX_AGE_DAYS |
550 5.7.1 This address accepts only delivery status notifications | mx listener: an SRS or VERP address with a sender that is not null |
550 5.7.1 Email rejected per DMARC policy for <domain> | mx listener: the message fails DMARC for a domain whose policy is reject |
550 5.7.1 Too many author domains | mx listener: the From: fields name more than five domains |
552 5.3.4 Message size exceeds fixed maximum message size | over 25 MiB (also for a SIZE parameter), or a bounce larger than 5 MiB |
552 5.3.4 Message header too large | a header block over 1 MiB |
554 5.6.0 Message header line too long | |
554 5.6.0 Message contains bare <CR> or <LF> | |
554 5.7.1 Not accepting messages | mx listener |
555 5.5.4 Unsupported parameter | e.g. NOTIFY while DSN is not offered |
555 5.5.4 Parameters need EHLO | parameters after HELO |
Codes Karta records for deliveries
A delivery outcome with a server reply records that reply's code and
enhanced code (or a default of the right class, 2.0.0, 4.0.0,
5.0.0, when the server gave none or one of another class), and details
as the server wrote it. When Karta decides without a reply, code is
empty and details says why:
| Enhanced | Result | Details |
|---|---|---|
4.4.1 | next address, then deferred | connecting failed: ..., or the server's greeting was not 220 |
4.4.2 | deferred | STARTTLS failed: ..., MAIL failed: ..., the connection was lost during DATA: ..., the session failed: ... |
4.4.3 | deferred | looking up the recipient's mail servers failed |
4.4.4 | deferred | the recipient's mail servers have only blocked addresses |
4.7.4 | next address (verified TLS) | the server does not offer STARTTLS |
4.7.5 | next address (verified TLS) | TLS failed: ... |
4.3.0 | deferred | the stored message could not be read |
4.4.7 | bounced | delivery time expired; last error: ... |
5.1.2 | bounced | the recipient domain does not exist; the recipient domain is not a valid domain name |
5.1.10 | bounced | the recipient domain accepts no mail (null MX) |
5.4.4 | bounced | no address found for the recipient's mail servers |
5.3.4 | bounced | the message is larger than the receiving server accepts |
5.6.0 | bounced | the message has bare CR or LF line endings |
5.6.3 | bounced | the receiving server does not accept 8-bit messages |
5.6.7 | bounced | the receiving server does not support SMTPUTF8 (RFC 6531) |
HTTP status codes
Each API page lists its own: Karta API, Postal-compatible API, Mailgun-compatible API, SendGrid-compatible API.