Article ID: 155455
Article Last Modified on 1/19/2007
RFC821 - Simple Mail Transfer Protocol (SMTP)
RFC1869 - SMTP Service Extensions (ESMTP)
176442 How to Create an Smtp.log File for Outlook Express
155515 How to Enable and Interpret the Pop3.log File
154578 Troubleshooting Problems Connecting to Mail Servers.
For SMTP : HELO SP <sender name> CRLF
For ESMTP : EHLO SP <sender name> CRLF
For HELO : 250-<requested mail action okay, completed> (receiver name)
For EHLO : 250-<requested mail action okay, completed> (receiver name)
250-(extended services supported...)
250-(...end-of-list)
or
502-<command not implemented>
504-<command parameter not implemented> [ESMTP not supported]
For Both : 421-<service not available, closing channel> (domain)
500-<syntax error, command unrecognized>
501-<syntax error in arguments> (suggested use) [not likely]
If the SMTP-receiver gets an error response to the EHLO command, it must
either issue the HELO or QUIT commands.
MAIL FROM: <reverse-path> CRLFThe <reverse-path> value is passed as an argument, and can be either 'user@host.dom' or just 'user.' In the event 'user' is what is passed to the server, the server's domain name will be tacked onto the end. The <reverse-path> is the address to which any response will go.
250-<requested mail action okay, completed> ()is expected in reply. Expected alternate responses to the MAIL command are:
RCPT TO: <forward-path> CRLFThe <forward-path> value is passed as an argument, and can be either 'user@host.dom' or just 'user.' In the event 'user' is what is passed to the server, the server's domain name will be tacked onto the end. The <forward-path> is the address to which the message will be delivered.
Destination address : USER@HOST2.DOM or USER Source route : @HOST1.DOM:USER@HOST2.DOMMost RCPT TO: entries will be observed with the destination address version of the forward-path value. For more information on the handling of source routes, please see RFC821.
250-<requested mail action okay, completed> ()
in reply. Expected alternate responses to the RECIPIENT command are:
Error : 421-<SMTP service not available; server shutdown imminent>
500-<syntax error, command unrecognized>
501-<syntax error in arguments> ()
503-<bad sequence of commands>
Failure : 450-<req. mail action not taken: mailbox unavailable>
451-<req. action aborted: local error in processing>
452-<req. action not taken: insufficient system storage>
550-<req. action not taken: mailbox unavailable>
551-<user not local; please try <forward-path>>
552-<req. mail action aborted: exceeded storage allocation>
553-<req. action not taken: mailbox name not allowed>
DATA CRLFThe SMTP-receiver will respond with
354-<start mail input; end with <CRLF>.<CRLF>> ()if the DATA command and the information sure to follow can be processed at that time. If the 354 reply is received, all of the information that comprises the message: headers, body text, encoding, etc. will be streamed to the SMTP-receiver. There are two times that we expect a response to the issuance of the DATA command: after it is issued, and when it completes. Completion of the DATA command is marked the SMTP-receiver's reception of the <CRLF>.<CRLF> sequence.
Success : 354-<start mail input; end with <CRLF>.<CRLF>> ()
Error : 421-<SMTP service not available; server shutdown imminent>
500-<syntax error, command unrecognized>
501-<syntax error in arguments> ()
503-<bad sequence of commands>
Failure : 451-<req. action aborted: local error in processing>
554-<transaction failed>
Expected alternate responses to completion of the DATA command are:
Success : 250-<requested mail action okay, completed> ()
Failure : 451-<req. action aborted: local error in processing>
452-<req. action not taken: insufficient system storage>
552-<req. mail action aborted: exceeded storage allocation>
554-<transaction failed>
- RESET Command
When the RESET command is issued, all of the SMTP-receiver's buffers are
cleared. Typically, this command is issued upon connection, after the
HELLO command, to cancel a current MAIL command, or after a DATA command
is completed. Usage of the RESET command follows:
RSET CRLF
The SMTP-receiver must respond with
250-<requested mail action okay, completed> ()
Any other response would indicate that the command was entered improperly
(not likely when a program does it) or that there is a problem with the
SMTP-receiver. The possible responses are listed below.
Error : 421-<SMTP service not available; server shutdown imminent>
500-<syntax error, command unrecognized>
501-<syntax error in arguments> ()
504-<command parameter not implemented>
- NO OPERATION Command
The NO OPERATION command has no effect whatsoever on the connection. It
does not affect any of the SMTP-receiver's buffers, or any MAIL
transaction currently in progress. It can be used by the SMTP-sender to
keep the connection open in lieu of an SMTP-receiver timeout. Usage
follows:
NOOP CRLF
The SMTP-receiver should send a 250 reply to the NO OPERATION command. The
only other possible responses are a 500 reply, indicating incorrect
command syntax, or the 421 reply, indicating that the SMTP service will be
shutting down shortly.
- QUIT Command
The QUIT command is used by the SMTP-sender to request that the connection
between the itself and the SMTP-receiver be closed. This command can be
issued at any time. Command usage follows:
QUIT CRLF
Upon reception of a QUIT command, the SMTP-receiver issues the following
response to the SMTP-sender:
221-<<domain> service closing transmission channel>
The only other possible response is a 500 reply which indicates that the
syntax used was incorrect. This is not likely to occur.
HKEY_CURRENT_USER\Software\Microsoft\Internet Mail and News\Mail Value Name : "Log SMTP (0/1)" (without quotes) Value Type : dword Value Data : 00000001 Value Name : "Log File (SMTP)" (without quotes) Value Type : string Value Data : <path to log file> In order to fit all the pertinent data for each entry on one line, the 'SMTP:' tag and the time stamp at the beginning of each line have been removed.
This is a fault-free connection in which one message is sent to an SMTP
server with ESMTP extensions enabled.
01) Microsoft(r) Plus! for Windows(r) 95 4.70.1155
02) SMTP Log started at Thu Aug 01 17:22:27
Lines 1 and 2 are plugged in every time Internet Mail and News is
launched.
03) [db] Connecting to 'smtp.host.com'.
04) [db] srv_addr = nnn.nnn.nnn.nnn
Lines 3 and 4 indicate the friendly name and the IP address of the SMTP
server specified in the Internet Mail and News configuration.
05) [rx] 220 smtp.host.com ESMTP server ready Thu, 1 Aug 1996 15:24:22 -
0700
06) [tx] EHLO smtp-client
07) [rx] 250-smtp.host.com
08) [rx] 250-HELP
09) [rx] 250-EXPN
10) [rx] 250-XREMOTEQUEUE
11) [rx] 250 PIPELINING
12) [tx] RSET
13) [rx] 250 Ok resetting state
Line 5 indicates that the communications channel between the SMTP sender
and receiver has been successfully opened. This prompts the EHLO command
to start an ESMTP session. Note that the EHLO command is followed by the
computer name of the client, not the user-id that is sending mail.
Lines 7-11 form the SMTP-receiver's response to the EHLO command. This
tells us that the server implements:
a) the standard SMTP HELP and EXPN commands
b) one nonstandard SMTP extension XREMOTEQUEUE
c) one standard SMTP extension PIPELINING
The SMTP-sender issues the RSET command on Line 12 as a precautionary
measure to flush the SMTP-receiver's forward- and return-path, mail data,
and transaction buffers.
14) [tx] MAIL FROM:<jdoe@somewhere.com>
15) [rx] 250 Sender <jdoe@somewhere.com> Ok
Line 14 shows the MAIL command issued with the required <reverse-path>
argument. In Line 15, the SMTP-receiver send the 250 reply, re-stating the
SMTP-sender's reverse-path. Only the 250 reply is absolutely required, not
all SMTP servers will supply this information, or in the same format.
16) [tx] RCPT TO:<janed@elsewhere.com>
17) [rx] 250 Recipient <janed@elsewhere.com> Ok
In Line 16, the SMTP-sender issues the RECIPIENT command with the
<forward-path> argument. The SMTP-receiver returns the 250 reply
reiterating the destination address.
18) [tx] DATA
19) [rx] 354 Ok Send data ending with <CRLF>.<CRLF>
20) [tx]
21) .
22) [rx] 250 Message received: 19960801222422078.AAA43@smtp-client
The SMTP-sender issues the DATA command in Line 18, gets the go-ahead from
the SMTP-receiver, and begins transmitting the content of the message.
Because messages that contain encoded objects can be several thousand
bytes in size, the log file does not display the transmitted data. Only
the <CRLF>.<CRLF> sequence (line 21) is shown.
In Line 22, the SMTP-receiver acknowledges the message, stamps it with an
SMTP-id, and transmits it.
23) [tx] QUIT
24) [rx] 221 smtp.host.com ESMTP server closing connection
25) [db] Connection to 'smtp.host.com' closed.
The SMTP-sender issues the QUIT command. The 221 reply indicates that the
SMTP-receiver has accepted the QUIT command and closed the connection,
evidenced in Line 25.
Additional query words: 1.00 4.00
Keywords: KB155455