What Is SMTP

This section provides a quick introduction on SMTP (Simple Mail Transfer Protocol) for message transmission. A SMTP sample session of submitting an email message using the 'telnet' command is included.

What Is SMTP? - SMTP (Simple Mail Transfer Protocol) is an Internet standard communication protocol for email message transmission between software agents locally or remotely.

The diagram "Email Processing and Software Agents / Protocols" listed in the last section shows you how the SMTP communication protocol is used by software agents MUA, MSA, MTA, and MDA to transfer email messages to recipient's mailboxes.

The original version of SMTP was published in 1981 by Jonathan B. Postel in "RFC788 - Simple Mail Transfer Protocol" ( datatracker.ietf.org/doc/html/rfc788).

A major extension of SMTP, also referred as ESMTP, was published in 1995 by J. Klensin, et. al. in "RFC1869 - SMTP Service Extensions" ( datatracker.ietf.org/doc/html/rfc1869).

By default, a MSA listens on port 25 for SMTP connection requests. Here is a sample session of submitting an email message with SMTP using "telnet" as the MUA. The receiving MSA is a Postfix server.

herong$ telnet 127.0.0.1 25

  Trying 127.0.0.1...
  Connected to 127.0.0.1
  Escape character is '^]'.
  220 mail.herongyang.com ESMTP Postfix
ehlo 127.0.0.1
  250-mail.herongyang.com
  ...
  250 SMTPUTF8
mail from: herong
  250 2.1.0 Ok
rcpt to: herong
  250 2.1.5 Ok
data
  354 End data with <CR><LF>.<CR><LF>
Hello world!
.
  250 2.0.0 Ok: queued as D86E9266002D
quit
  221 2.0.0 Bye
  Connection closed by foreign host.

Note that transmitting email messages with SMTP is not secure, because data is transmitted in clear text. So most of email systems are not using SMTP directly anymore. They are using the SMTPS (Simple Mail Transfer Protocol Secure) method to secure the SMTP communication. This is done by wrapping the SMTP communication under a SSL (Secure Socket Layer) or TLS (Transport Layer Security) connection. See next section for more details on SMTPS.

Table of Contents

 About This Book

Introduction to Email

 What Is Email

What Is SMTP

 What Is SMTPS

 What Is IMAP

 What Is IMAPS

 What Is POP3

 What Is POP3S

 Postfix - Mail Transport Agent (MTA)

 SSL/TLS Secure Connections with Postfix Server

 Dovecot - IMAP and POP3 Server

 SSL/TLS Secure Connections with Dovecot Server

 Email Client Tools - Mail User Agents (MUA)

 Mozilla Thunderbird - Mail User Agents (MUA)

 References

 Full Version in PDF/EPUB