Chapter 16. Email 203
SMTP also handles cases where email needs to be forwarded between systems, when the receiving
system knows where to send the message. The protocol can verify that certain users are indeed served
by a particular mail server (the VRFY command) or expand a mailing list (the EXPN command). Email
can also be relayed between two SMTP servers, if both systems permit such activity.
Unlike IMAP and POP, the SMTP protocol does not require authentication. This means that SMTP
servers can allow anyone on the Internet to use your system to send or relay mail to large lists of
recipients. It is this characteristic of SMTP that makes spam possible. Modern SMTP applications
attempt to minimize this behavior by restricting relaying and allowing only known hosts to send
email.
RFC-821 outlines the basic behavior of SMTP, but several SMTP extensions, made possible by RFC-
1869, have added additional functionality to SMTP over the years by making new commands avail-
able. By initiating a conversation with an SMTP server with an EHLO command rather than HELO,
the connecting server can identify itself as one that supports SMTP extensions. The receiving server
answers with a 250 line containing the various SMTP extensions it supports. Then, the connecting
server can use the supported extensions as it wishes to accomplish the goals of the communication.
One extension adds SMTP Authentication through the AUTH command as outlined in RFC-2554.
Another widely used SMTP extension, detailed in RFC-2034, discusses the use of dot-separated,
standardized error codes for use between SMTP applications. Reading the various RFCs that involve
SMTP provides a background to the way email moves around the Internet. In addition, you can con-
nect to an SMTP server via telnet by specifying port 25, such as telnet localhost 25. Executing
a few commands and sending a mail manually is a good way to understand how SMTP communica-
tions work.
Red Hat Linux 7.3 uses Sendmail as its SMTP program by default. However, easier to use applications,
such as Postfix, are also installed by default with the operating system.
16.2. Email Program Classifications
In general, all email applications fall into at least one of three classifications. Each of these classifica-
tions plays a specific role in the process of moving and managing email messages. While most users
are only aware of the specific email program they use to receive and send messages, each of these
types is important for making sure email arrives at the correct destination.
16.2.1. Mail User Agent
A Mail User Agent (MUA) is a program that, at the very least, allows a user to read and compose email
messages. An MUA is often referred to as an email client. Of course, many MUAs help users do more
than that, including retrieving messages via the POP or IMAP protocols, setting up mailboxes to store
messages, or helping present new messages to a Mail Transfer Agent program that will deliver them
to their final destination.
MUA programs may be graphical, such as Mozilla Mail, or have a very simple, text-based interface,
such as mutt or pine.
16.2.2. Mail Transfer Agent
A Mail Transfer Agent (MTA) transfers email messages between machines using SMTP. A message
may involve several MTAs as it moves to its intended destination. Most users are totally unaware of
the presence of MTAs, even though every email message is sent through at least one MTA.
While the delivery of messages between machines may seem rather straightforward, the entire process
of deciding if a particular MTA can or should accept a message for delivery to a remote host is quite
Commenti su questo manuale