Data ● Start data

RFC 5321 ● 3.3 ● Mail Transactions

The third step in the procedure is the DATA command (or some alternative specified in a service extension).

DATA <CRLF>

If accepted, the SMTP server returns a 354 Intermediate reply and considers all succeeding lines up to but not including the end of mail data indicator to be the message text. When the end of text is successfully received and stored, the SMTP-receiver sends a "250 OK" reply.

Since the mail data is sent on the transmission channel, the end of mail data must be indicated so that the command and reply dialog can be resumed. SMTP indicates the end of the mail data by sending a line containing only a "." (period or full stop). A transparency procedure is used to prevent this from interfering with the user's text (see Section 4.5.2).

The end of mail data indicator also confirms the mail transaction and tells the SMTP server to now process the stored recipients and mail data. If accepted, the SMTP server returns a "250 OK" reply. The DATA command can fail at only two points in the protocol exchange:

If there was no MAIL, or no RCPT, command, or all such commands were rejected, the server MAY return a "command out of sequence" (503) or "no valid recipients" (554) reply in response to the DATA command. If one of those replies (or any other 5yz reply) is received, the client MUST NOT send the message data; more generally, message data MUST NOT be sent unless a 354 reply is received.

If the verb is initially accepted and the 354 reply issued, the DATA command should fail only if the mail transaction was incomplete (for example, no recipients), if resources were unavailable (including, of course, the server unexpectedly becoming unavailable), or if the server determines that the message should be rejected for policy or other reasons.

However, in practice, some servers do not perform recipient verification until after the message text is received. These servers SHOULD treat a failure for one or more recipients as a "subsequent failure" and return a mail message as discussed in Section 6 and, in particular, in Section 6.1. Using a "550 mailbox not found" (or equivalent) reply code after the data are accepted makes it difficult or impossible for the client to determine which recipients failed.

When the RFC 822 format ([28], [4]) is being used, the mail data include the header fields such as those named Date, Subject, To, Cc, and From. Server SMTP systems SHOULD NOT reject messages based on perceived defects in the RFC 822 or MIME (RFC 2045 [21]) message header section or message body. In particular, they MUST NOT reject messages in which the numbers of Resent-header fields do not match or Resent-to appears without Resent-from and/or Resent-date.

Mail transaction commands MUST be used in the order discussed above.

The Kozlowski Family ● An Attempt at RestorationFamily.Kozlowski
Help Library

Core

Dev

Kind

Kit

Leaf

Map

Message

Net

Overview

Packet

Primitives

Run

Secure

Session

Site

Socket

Sprint

Stack

Tool

The Tree

Network Help

App

Internet

Hit

Kit

Link

Packet

Session

Socket

Net Tool

Transport

Application Layer Help

Aide

Console

DHCP

Director

DNS

Forward

HTTP

HTTPS

IMAP ● Internet Message Access Protocol

LLMNR

Manage

MDNS

NNTP

POP3

RDP

RTP

RTSP

Shofar

SIP

SMTP

SNMP

SSH

SSDP

Syslog

TFTP

Telnet

WhoIs

X

XMPP

SMTP ● Simple Message Transfer Protocol
Client
Server
SMTP Server Accept Parse
Head
SMTP Head Time To
From
Body
Query
Data ● Start data Quit
EHLO ● HELO ● Extended HELLO or HELLO RCPT ● TO:<forward-path> [ SP <rcpt-parameters> ]
MAIL ● FROM:<reverse-path> [SP <mail-parameters> ] Rset ● Reset
NoOp ● No Operation
Reply
211 ● System status 250 ● Requested mail action okay, completed
214 ● Help message 251 ● User not local; will forward to <forward-path>
220 ● <domain> Service ready 252 ● Cannot VRFY user, but will accept message and attempt delivery
354 ● Start mail input; end with <CRLF>.<CRLF>
421 ● <domain> Service not available, closing transmission channel Requested action not taken: insufficient system storage
Requested mail action not taken: mailbox unavailable Server unable to accommodate parameters
Requested action aborted: error in processing
500 ● Syntax error, command unrecognized 551 ● User not local; please try <forward-path>
Syntax error in parameters or arguments 552 ● Requested mail action aborted: exceeded storage allocation
502 ● Command not implemented 553 ● Requested action not taken: mailbox name not allowed
503 ● Bad sequence of commands 554 ● Transaction failed
Command parameter not implemented 555 ● MAIL FROM/RCPT TO parameters not recognized or not implemented
Server does not accept mail 556 ● mail will not be accepted
550 ● Requested action not taken: mailbox unavailable