Smtp and Sendmail
Here you'll find most of the systems and services used to move an email from one place to another.

You never see or directly use the protocols that move your emails all over the internet, but all email  on internet and in many local networks use smtp services when handling email.

The goal is to explain as much as possible, in a very easy to understand manner.

Email in your computer

Mail boxes

A mail-box is a file, or possibly a directory of files, where incoming messages are stored.

Mail software

A mail user agent, or MUA, is an application run directly by a user. User agents are used to compose and  send out-going messages as well as to display, file and print messages which have arrived in a user's  mail-box. Examples of user agents are Eudora, Outlook Express and Outlook.

Transfer Agents

Mail transfer agents (MTAs) are used to transfer messages between machines. User agents give the message to  the transfer agent, who may pass it onto another transfer agent, or possibly many other transfer agents.  Users may give messages to transfer agents directly, but this requires some expertise on the part of the user and is only recommended for experts.

Transfer agents are responsible for properly routing messages to their destination. While their function is  hidden from the average user, theirs is by far the most complex part of getting messages from their source to  their destination. The most common transfer agent is sendmail. The protocol used when connecting to an mail
server, is called SMTP.

Pop Account, Mailing Lists and Aliases

The place where your email is stored in a server is called pop account (and by many mailbox).

The most common used protocol (language) when speaking with a pop account is POP (Post Office Protocol).

Another more advanced protocol is IMAP.

A mail address is the address to a pop account, alias or mailinglist.

A mail address consists of some text followed by an @ and then followed by more text.

The first part (to the left of @) is the pop account (mailbox) or alias followed by @ and finally the domain  (ex.



A mailinglist is a list with a name, containing one or more mail addresses, mailinglist addresses or aliases.


Is a mail address that send incoming email along to another email address (also
called forwarder)

Headers & Bodies

Each message consists of two parts. The headers contain information about who authored the message, the intended  recipients, the time of creation, the subject of the message, delivery stamps, ... Each header is of the form  "keyword: value", where keyword is a special word (like From or Date) identifying the type of information contained in that header, and value is the information itself.

A blank line always separates the headers from the body. The body contains the information the sender is trying to  communicate. The "message" as most people think of it is really the body of the message.


For many years, most messages were plain text in the US-ASCII character set, so no structure was needed for message  bodies. The explosion of messaging in Europe and Asia in the mid 1990s and that of transmission of multi-media messages  in the late 1990s brought about such a need.

Content-Type: text/plain; charset=us-ascii

indicates that the message consists of plain text in the US-ASCII character set. MIME also specifies how to encode data  when necessary (more on this below). It is the responsibility of the receiving user agent to use this information to  display the message in a form that will be understood by the user.

Transfer Protocols

The language spoken between transfer agents is known as a transfer protocol. There are many in existence; the most common  is Simple Mail Transfer Protocol.

Envelopes and Bodies

SMTP uses the concept of an envelope to transfer messages; this merely contains information about from whom the message  originated and to whom it is destined. The originator address is important: in case there is a problem transferring or  delivering the message, the originator can be notified.

The SMTP body is the entire message as defined above in Headers & Bodies. So the message headers plus the message body  equals the SMTP body. The term SMTP body is not used that commonly, but it is important to distinguish it from the message  body.