SMTP, defined in RFC 821, is used to provide e-mail services to IP devices over the Internet. Typically, two mail servers "talk" SMTP to exchange e-mail. After the e-mail is exchanged, the users can retrieve their mail from the mail server and read it. This can be done using any mail client, such as Pine, Eudora, Outlook, and so on, which use different protocols, such as Post Office Protocol 3 (POP3), to connect to the server. SMTP uses well-known ports TCP port 25 and UDP port 25. Typically, though, SMTP applications use only TCP port 25.
A process or daemon running on a server uses SMTP to send mail to clients. A program called Sendmail is a common tool used for SMTP mail transfer. Recently, a new release of SMTP, called Enhanced SMTP (ESMTP), was developed. You are not required to know this protocol for the written exam.
The client and SMTP server send various commands when communicating. The most common command is HELO, which introduces the calling machine to the receiving machine; the client machine advertises its host name to the mail server. There are numerous other commands, some of which are described in the following list. If you are interested in further details on the Sendmail application, a great resource is Sendmail, by Bryan Costales and Eric Allman (O'Reilly and Associates, ISBN 1-56592-839-3). For more details on SMTP, refer to the RFC 821 documentation at http://www.faqs.org/rfcs/rfc821.html.
To test whether a remote host's SNMP mail is operational and active, use Telnet with the defined HELO command. The following is a summary of other useful SMTP commands, in case you are questioned on these commands during the exam:
MAIL (MAIL)—Initiates a mail transaction in which the mail data is delivered to mailboxes.
RECIPIENT (RCPT)—Identifies an individual recipient of the mail data; multiple use of the command is needed for multiple users.
DATA (DATA)—Identifies the lines following the command (such as the MAIL command) as the mail data in ASCII character codes.
SEND (SEND)—Initiates a mail transaction in which the mail data is delivered to one or more terminals.
SEND OR MAIL (SOML)—Initiates a mail transaction in which the mail data is delivered to one or more terminals or mailboxes.
SEND AND MAIL (SAML)—Initiates a mail transaction in which the mail data is delivered to one or more terminals and mailboxes.
RESET (RSET)—Aborts the current mail transaction. Any stored sender, recipients, and mail data must be discarded, and all buffers and state tables must be cleared. The receiver must send an OK reply.
VERIFY (VRFY)—Verifies if a user exists; a fully specified mailbox and name are returned. NOOP (NOOP)—Specifies no action other than that the receiver sent an OK reply. QUIT (QUIT)—Closes the transmission channel; the receiver must send an OK reply.
Was this article helpful?