Share via

SMTP Commands and Definitions


This topic contains reference material about the following topics:

  • Simple Mail Transfer Protocol (SMTP) commands

  • Internal SMTP transport mechanisms

  • SMTP event sinks

  • Ports that are commonly used by Microsoft® Exchange

SMTP Commands

The following table lists the SMTP commands that are provided by the Microsoft Windows® SMTP service (SMTPSVC).

SMTP commands

SMTP command Command function


Sent by a client to identify itself, usually with a domain name.


Enables the server to identify its support for Extended Simple Mail Transfer Protocol (ESMTP) commands.


Identifies the sender of the message; used in the form MAIL FROM:.


Identifies the message recipients; used in the form RCPT TO:.


Allows the client and server to switch roles and send mail in the reverse direction without having to establish a new connection.


The ATRN (Authenticated TURN) command optionally takes one or more domains as a parameter. The ATRN command must be rejected if the session has not been authenticated.


Provides a mechanism by which the SMTP server can indicate the maximum size message supported. Compliant servers must provide size extensions to indicate the maximum size message that can be accepted. Clients should not send messages that are larger than the size indicated by the server.


An extension of SMTP. ETRN is sent by an SMTP server to request that another server send any e-mail messages that it has.


Provides the ability to send a stream of commands without waiting for a response after each command.


An ESMTP command that replaces the DATA command. So that the SMTP host does not have to continuously scan for the end of the data, this command sends a BDAT command with an argument that contains the total number of bytes in a message. The receiving server counts the bytes in the message and, when the message size equals the value sent by the BDAT command, the server assumes it has received all of the message data.


Sent by a client to initiate the transfer of message content.


An ESMTP command that enables delivery status notifications.


Nullifies the entire message transaction and resets the buffer.


Verifies that a mailbox is available for message delivery; for example, vrfy ted verifies that a mailbox for Ted resides on the local server. This command is off by default in Exchange implementations.


Returns a list of commands that are supported by the SMTP service.


Terminates the session.

The following table lists the extended SMTP commands that Exchange makes available to the SMTP service.

Extended SMTP commands

Extended SMTP command Command function


A method that is used by Microsoft Exchange Server 2003 and Exchange 2000 Server servers to authenticate.


A method that is used by Exchange 2000 and Exchange 2003 servers to authenticate.


Provides the ability to propagate message properties during server-to-server communication.


Adds support for link state routing in Exchange.

Event Sinks

You can use event sinks to extend and modify the behavior of the Microsoft Windows 2000 Server and Windows Server™ 2003 SMTP service. Exchange 2003 requires the Windows 2000 or Windows Server 2003 SMTP service to function because most of the transport functionality in Exchange 2003 is accomplished with this architecture. Therefore, after you reinstall Internet Information Services (IIS) or the Windows 2000 or Windows Server 2003 SMTP service, you must also reinstall Exchange.

An SMTP service event is the occurrence of some activity within the SMTP service, such as the transmission or arrival of an SMTP command or the submission of a message into the SMTP service transport component. When a particular event occurs, the SMTP service uses an event dispatcher to notify registered event sinks of the event. When notifying event sinks, the SMTP service passes information to the sink in the form of Component Object Model (COM) object references.

The two general categories of SMTP service events are:

  • Protocol Events

    Protocol events occur when SMTP commands are either received or transmitted over the network. These events occur when:

    • A client SMTP service or mail user agent uses SMTP to transmit messages for delivery to the local service.

    • The SMTP service relays messages to other SMTP services.

  • Transport Events

    Transport events occur when the SMTP service receives a message, and that message passes through the SMTP core transport. During the passage through the transport, the message is categorized (examined and placed into categories), and then either delivered to a local storage location or, if it is not local, relayed to another destination.

The default Windows 2000 and Windows Server 2003 protocol and transport events are only accessible by writing Component Object Model (COM) objects in Microsoft Visual C++®. These events are fast, require no extra processing, and offer access to the lowest-level message properties; however, these events are more complex to write. For smaller jobs that do not require high performance, you can use the CDO_OnArrival event, which you can write using Microsoft Visual Basic® Scripting Edition (VBScript).

For more information about writing one of these event sinks, download the Platform SDK, or see the MSDN® developer program article Microsoft Windows 2000 SMTP Service Events.

Common Ports Used by Exchange

The following table lists the ports commonly used by Exchange. For more information about which ports need to be opened internally or externally, see Using Microsoft Exchange 2000 Front-End Servers.

Ports used by Exchange

Protocol Port Description


TCP: 25

The SMTP service uses TCP port 25.



DNS listens on port 53. Domain controllers use this port.


TCP: 691

The Microsoft Exchange Routing Engine service (RESvc) listens for routing link state information on this port.


TCP/UPD: 389

Lightweight directory access protocol (LDAP) used by Microsoft Active Directory® directory service, Active Directory Connector, and the Microsoft Exchange Server 5.5 directory use this port.


TCP/UDP: 636

LDAP over Secure Sockets Layer (SSL) uses this port.


TCP/UDP: 379

The Site Replication Service (SRS) uses this port.


TCP/UDP: 390

This is the recommended alternate port to configure the Exchange Server 5.5 LDAP protocol when Exchange Server 5.5 is running on an Active Directory domain controller.


TCP: 3268

Global catalog. The Windows 2000 and Windows Server 2003 Active Directory global catalog (a domain controller "role") listens on TCP port 3268.


TCP: 3269

Global catalog over SSL. Applications that connect to TCP port 3269 of a global catalog server can transmit and receive SSL encrypted data.


TCP: 143

Internet Message Access Protocol (IMAP) uses this port.


TCP: 993

IMAP4 over SSL uses this port.


TCP: 110

Post Office Protocol version 3 (POP3) uses this port.


TCP: 995

POP3 over SSL uses this port.


TCP: 119

Network News Transfer Protocol (NNTP) uses this port.


TCP: 563

NNTP over SSL uses this port.


TCP: 80

HTTP uses this port.


TCP: 443

HTTP over SSL uses this port.