MAIL ● FROM:<reverse-path> [SP <mail-parameters> ]

RFC 5321 ● 3.3 ● Mail Transactions

There are three steps to SMTP mail transactions. The transaction starts with a MAIL command that gives the sender identification. (In general, the MAIL command may be sent only when no mail transaction is in progress; see Section 4.1.4.) A series of one or more RCPT commands follows, giving the receiver information. Then, a DATA command initiates transfer of the mail data and is terminated by the "end of mail" data indicator, which also confirms the transaction.

The first step in the procedure is the MAIL command.

MAIL FROM:<reverse-path> [SP <mail-parameters> ] <CRLF>

This command tells the SMTP-receiver that a new mail transaction is starting and to reset all its state tables and buffers, including any recipients or mail data. The <reverse-path> portion of the first or only argument contains the source mailbox (between "<" and ">" brackets), which can be used to report errors (see Section 4.2 for a discussion of error reporting). If accepted, the SMTP server returns a "250 OK" reply. If the mailbox specification is not acceptable for some reason, the server MUST return a reply indicating whether the failure is permanent (i.e., will occur again if the client tries to send the same address again) or temporary (i.e., the address might be accepted if the client tries again later). Despite the apparent scope of this requirement, there are circumstances in which the acceptability of the reverse-path may not be determined until one or more forward-paths (in RCPT commands) can be examined. In those cases, the server MAY reasonably accept the reverse-path (with a 250 reply) and then report problems after the forward-paths are received and examined. Normally, failures produce 550 or 553 replies.

Historically, the <reverse-path> was permitted to contain more than just a mailbox; however, contemporary systems SHOULD NOT use source routing (see Appendix C).

The optional <mail-parameters> are associated with negotiated SMTP service extensions (see Section 2.2).

The Kozlowski FamilyKozlowski
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