Network Daemons  «Prev 

Simple Mail Transfer Protocol (SMTP)

SMTP is used to transfer electronic mail among machines on the Internet. It uses well-known port number 25; the most common daemon program for this protocol is called sendmail, though there are others (qmail, smail). Note that SMTP is used for machine-to-machine email transfer. Mail readers (Mail User Agents, in technical jargon) often use the Post Office Protocol (POP). Simple Mail Transfer Protocol (SMTP) is an Internet standard for electronic mail (e-mail) transmission across Internet Protocol (IP) networks. SMTP was first defined by RFC 821 (1982, eventually declared STD 10), and last updated by RFC 5321 (2008) which includes the extended SMTP (ESMTP) additions, and is the protocol in widespread use today. SMTP uses TCP port 25. The protocol for new submissions (MSA) is effectively the same as SMTP, but it uses port 587 instead. SMTP connections secured by SSL are known by the shorthand SMTPS, though SMTPS is not a protocol in its own right.

History of Sendmail

The sendmail program was originally written by Eric Allman while he was a student and staff member at the University of California at Berkeley. At the time, one campus machine (Ingres) was connected to the ARPAnet and was home to the INGRES project where Eric was working. Another machine (Ernie CoVax) was home to the Berkeley Unix project and had recently started using the Unix to Unix Communication Protocol (UUCP). These machines (as well as several others on campus) were connected via a low-cost network built by Eric Schmidt, called BerkNet. Software existed to move mail within ARPAnet, within UUCP, and within BerkNet, but none yet existed to move mail between these three networks. A sudden increase in protocol types, coupled with the anticipation of an explosion in the number of networks, motivated Eric Allman to write delivermail-the precursor to sendmail. The delivermail program was shipped in 1979 with 4.0 and 4.1 BSD Unix. Unfortunately, delivermail was not flexible enough to handle the changes in mail-routing requirements that actually occurred. Perhaps its greatest weakness was that its configuration was compiled in.


In 1980, ARPAnet began converting from (NCP) Network Control Protocol to (TCP) Transmission Control Protocol. This change increased the number of possible hosts from 256 to more than 1 billion. Another change converted from a "flat" host-name space (such as MIT-XX) into a hierarchical namespace (such as XX.MIT. EDU). Prior to these changes, mail was transported using the File Transfer Protocol (FTP). Afterward, a new protocol was developed for transporting mail called Simple Mail Transfer Protocol (SMTP). These developments were not instantaneous. Some networks continued to run NCP years after most others switched to TCP and SMTP underwent many revisions before finally settling into its present form. Responding to these and other changes, Eric evolved delivermail into sendmail. To ensure that messages transferred between networks would obey the conventions required by those networks, Eric took a "liberal" approach-modifying address information to conform rather than rejecting it. At the time, for example, UUCP mail often had no headers, so sendmail had to create them from scratch. The first sendmail program was shipped with 4.1c BSD (the first version of Berkeley Unix to include TCP/IP). From that first release to the present, Eric has continued to enhance sendmail, first at UC Berkeley, then at Britton Lee, then back at UC Berkeley, then with InReference Inc., and now with Sendmail.