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

ReplyWhen
220 <host> ESMTPgreeting
250 <host> and the extension listHELO, EHLO
220 2.0.0 Ready to start TLSSTARTTLS
235 2.7.0 Authentication successfulAUTH
250 2.1.0 OKMAIL FROM
250 2.1.5 OKRCPT TO
354 End data with <CR><LF>.<CR><LF>DATA
250 2.0.0 <n> octets receiveda 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 OKRSET, NOOP
252 2.5.0 Cannot VRFY user, but will accept message and attempt deliveryVRFY
214 2.0.0 See https://www.rfc-editor.org/rfc/rfc5321HELP
221 2.0.0 ByeQUIT
334 ...an AUTH challenge

Temporary failures (4xx)

ReplyWhen
421 4.7.0 Too many connections, try again laterper-client connection or rate limit
421 4.7.0 Too many errors, closing connection10 protocol errors
421 4.7.0 Too many rejected commands, closing connection20 policy rejections
421 4.7.0 Too many authentication failures3 failed AUTH attempts
421 4.4.2 <host> Error: timeout exceededidle too long
421 4.4.2 Connection time limit exceededthe connection lived 1 hour
421 4.3.2 <host> Service shutting downthe node is stopping
450 4.7.1 Sending rate limit exceeded, try again laterthe SMTP credential's limit
451 4.3.0 Temporary storage failure, try again laterthe message could not be stored
451 4.3.0 Temporary failure, try again laterthe database failed
451 4.3.2 System not accepting network messagesmx listener: the recipient-domain cache is not loaded
452 4.5.3 Too many recipientsmore than 100 recipients, or another server's recipient on the mx listener
454 4.7.0 Temporary authentication failurethe credential store is unavailable

Permanent failures (5xx)

ReplyWhen
500 5.5.2 Command unrecognizedunknown command
500 5.5.2 Bare <CR> or <LF> not alloweda command line with a bare CR or LF
500 5.5.2 Line too longa 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 namean 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 base64in an AUTH exchange
501 5.0.0 Authentication cancelledthe client sent *
502 5.5.1 Command not implementedEXPN; 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 activecommands out of order
504 5.5.4 Unrecognized authentication type
530 5.7.0 Must issue a STARTTLS command firstAUTH before TLS; or MAIL FROM from an IP range that requires TLS on a plain connection
530 5.7.0 Authentication requiredMAIL 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 invalidwrong user name or password
550 5.7.1 Sender address not permittedenvelope sender not at a verified domain
550 5.7.1 From or Sender address not permittedauthor not at a verified domain
550 5.6.0 Message has no From fieldalso: 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 SMTPUTF8on MAIL FROM (553 on RCPT TO)
550 5.1.1 Recipient address rejectedmx listener: no route for the address; an invalid SRS address or return path
550 5.1.2 Recipient domain not served heremx listener: no route for the recipient's domain
550 5.2.1 Return path has expiredmx listener: a VERP return path older than KARTA_BOUNCE_MAX_AGE_DAYS
550 5.7.1 This address accepts only delivery status notificationsmx 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 domainsmx listener: the From: fields name more than five domains
552 5.3.4 Message size exceeds fixed maximum message sizeover 25 MiB (also for a SIZE parameter), or a bounce larger than 5 MiB
552 5.3.4 Message header too largea 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 messagesmx listener
555 5.5.4 Unsupported parametere.g. NOTIFY while DSN is not offered
555 5.5.4 Parameters need EHLOparameters 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:

EnhancedResultDetails
4.4.1next address, then deferredconnecting failed: ..., or the server's greeting was not 220
4.4.2deferredSTARTTLS failed: ..., MAIL failed: ..., the connection was lost during DATA: ..., the session failed: ...
4.4.3deferredlooking up the recipient's mail servers failed
4.4.4deferredthe recipient's mail servers have only blocked addresses
4.7.4next address (verified TLS)the server does not offer STARTTLS
4.7.5next address (verified TLS)TLS failed: ...
4.3.0deferredthe stored message could not be read
4.4.7bounceddelivery time expired; last error: ...
5.1.2bouncedthe recipient domain does not exist; the recipient domain is not a valid domain name
5.1.10bouncedthe recipient domain accepts no mail (null MX)
5.4.4bouncedno address found for the recipient's mail servers
5.3.4bouncedthe message is larger than the receiving server accepts
5.6.0bouncedthe message has bare CR or LF line endings
5.6.3bouncedthe receiving server does not accept 8-bit messages
5.6.7bouncedthe 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.