3.1 The e-mail delivery process 31
SMTP in particular has to be addressed if the vast majority of Internet
(spam) messages are to be managed and controlled. Protocols other than
SMTP-related ones have to make their own provisions for SMTP-compliant
interfaces. If technological anti-spam approaches are to be successful, they
have to accommodate the wide deployment of SMTP and its weaknesses.
Consequently, the SMTP delivery process is inspected here in more detail.
The specification of SMTP can be found in RFC 2821 [93], which subsumes
the original SMTP specification of RFC 821 [135], the domain name system
requirements and implications for e-mail transport from RFC 1035 [108] and
RFC 974 [133], the requirements for Internet hosts in RFC 1123 [108], and
material drawn from the SMTP extension mechanisms [92]. In order to get a
more comprehensible overview of the protocol and its security weaknesses, the
textual representation is modeled with a diagram. Unified Modeling Language
(UML) provides activity diagrams and sequence diagrams, both of which are
appropriate. However, as the information flows between the communicating
MTAs are relevant, a sequence diagram is used. Figure 3.2 shows a UML (2.0)
sequence diagram modeling SMTP.
When an SMTP client has a message to transmit, it establishes a two-
way transmission channel to an SMTP server. The responsibility of an SMTP
client is to transfer e-mail messages to one or more SMTP servers, or report its
failure to do so. The server responds to each command with a reply; replies
may indicate that the command was accepted, that additional commands
are expected, or that a temporary or permanent error condition exists. The
server response consists of a number and a text represented by the attributes
code and text. Commands specifying the sender or recipients may include
server-permitted SMTP service extension requests. The dialog is purposely
lock-step, one-at-a-time, although this can be modified by mutually-agreed
extension requests, such as command pipelining [59], which is not modeled
here. Regarding the reply codes, the limited set offered by SMTP is used,
even though RFC 1893 [185] provides enhanced Mail System Status Codes.
These are not necessary for use in this modeling context.
The SMTP procedure contains four phases: the session initiation, the client
initiation, the e-mail transactions, and the session termination. An SMTP
session is initiated when a client opens a connection to a server and the server
responds with opening information. The SMTP server is allowed to reject
a transaction by giving a 554 response. A server taking this approach must
still wait for the client to send a quit before closing the connection. Once
the server has sent the welcoming message and the client has received it, the
latter normally sends the EHLO command to the server, indicating the client’s
identity, which is also denoted as the Fully Qualified Domain Name (FQDN),
e.g. darth-vader.winfor.rwth-aachen.de. In addition to opening the session,
the use of EHLO indicates that the client is able to process service extensions
and the client then requests that the server provide a list of the extensions
which the server supports; each service extension contains a keyword and a
parameter list. Older SMTP systems, which are unable to support service