I wrote this for a friend from the DOS/Windoze world, who is getting an Internet education under fire. I thought it might be useful for others as well.
Transporting Email Across System Lines
an Internet Email Terminology Primer
SMTP and POP are often thought of as programs, but they aren't (although one could name a program for them). They're actually protocols. SMTP and POP define how mail is to be transmitted and received and how the various programs involved can communicate with each other.SMTP was the first common mail protocol for the Internet - Simple Mail Transport Protocol. The Post Office Protocol (POP) is much more recent than SMTP.
Who Does What
Mail is handled by two parts - a Mail Transport Agent (MTA) and a Mail User Agent (MUA). The MTA moves mail around, and mail is generated, read, and otherwise user-manipulated by the MUA.MTAs handle mail through standard ports. In the unix world these ports have common names - smtp, pop2, pop3. The actual port numbers for these are 25, 109 and 110, respectively. All email traffic for these protocols is initiated on one of these ports. (A port is part of an address for a networking service.)
sendmail is one possible MTA. It's the MTA provided with most versions of unix, and therefore the most common MTA in the unix and SMTP arenas. Probably the second most common MTA in these arenas is smail (which often is installed as smtpd).
pop MTAs are rapidly becoming more common. These are typically named with the protocol revision - most modern sites use something like pop3d, which speaks POP version 3.
How They Do It
While sendmail typically runs as a daemon (constant background process) on most UNIX boxes, popd is invoked by inetd (1) only when something happens on the standard POP port. If a constant stream of mail is to be handled by POP, popd can be run as a daemon. Systems with very little SMTP traffic can run sendmail on demand via inetd.Any given MUA probably speaks either SMTP or POP (at least if it cares about communicating with the world at large). Most DOS/Win-based MUAs speak POP. Most UNIX-based MUAs speak SMTP. Netscape speaks both (at least the UNIX version does). I'm not really sure what Mac MUAs expect. NEXTSTEP/OpenStep is UNIX-based so it speaks SMTP. Proprietary OSes, such as DEC's VMS and the various things IBM runs on its mainframes and minis, typically have their own protocols, but SMTP (and maybe POP) are typically available as options or after market products.
Further reading
See the man pages for sendmail, ipopd, in.pop3d, inetd, and the related RFCs and configuration files noted in those pages. O'Reilly's _sendmail_ is the definitive volume on that subject. Vol 3 (DOD Protocols) of Stallings' _Handbook_of_Communication_Standards_ (Macmillan) covers SMTP and other Internet standards. Source code for most of these programs is available with documentation as well.
Notes(1) inetd is the "internetworking daemon". Rather than run every possible networking program as a daemon, wasting lots of memory, only those programs that are used a lot, or require instant response, run as daemons. inetd handles the rest by listening on the various ports its clients would listen on, and when a message arrives on a port, starting the appropriate process and handing the message off to it.
Thanks to Steve Hultquist & Joel D. Limmer for their suggestions.
Last updated: 01 October 1998Copyright 1996 Miles O'Neal, Austin, TX. All rights reserved. Miles O'Neal <roadkills.r.us@XYZZY.gmail.com> [remove the "XYZZY." to make things work!] c/o RNN / 1705 Oak Forest Dr / Round Rock, TX / 78681-1514