Jim Jackson <jj@franjam.org.uk>
This document can be found at
http://www.franjam.org.uk/linux/InternetEmail.html
- Email was one of the first Internet Applications
- Originally specified in RFC's in August 1982
- Current Internet Email builds on and expands the early standards, but is essentially much the same
- An Email is a file or sequence of bytes that matches the format described in RFC2822, the update to the original RFC822.
- a Header consisting of a sequence of fields have values that give information about the Email in a machine readable format, e.g. To:, From:, Date:
- an optional body consisting of lines of text
- a blank line seperates the header from the body
- An Email header field consists of the fieldname, a colon (':') and the value of the field.
- Some field values are fairly free form, e.g. Subject:
- others have a strict structure, e.g. Email addresses in To:, From:, Cc: fields
From: Jim Jackson <jj@franjam.org.uk>
To: all@world.com
Subject: Message to Everyone
Hello World!
- Email is sent using Simple Mail Transport Protocol aka SMTP . First defined in RFC821 in Aug 1982, currently defined by RFC2821
+----------+ +----------+
+------+ | | | |
| User |<-->| | SMTP | |
+------+ | Client- |Commands/Replies| Server- |
+------+ | SMTP |<-------------->| SMTP | +------+
| File |<-->| | and Mail | |<-->| File |
|System| | | | | |System|
+------+ +----------+ +----------+ +------+
SMTP client SMTP server
<-------- 220 Greeting message
HELO system.name -------->
<-------- 250 servername pleased to meet you
Mail From: user@add.com
-------->
<-------- 250 user@add.com... sender ok
Rcpt To: name@host.edu
-------->
<-------- 250 name@host.edu... Recipient ok
Data -------->
<-------- 354 Enter mail, end with "."
on a line by itself
RFC2822 stream of bytes...
-------->
. -------->
<-------- 250 RefID Message Accepted
quit -------->
<-------- 221 system.name closing connection
- The email address used in the SMTP Mail From: line, called the envelope sender, is not necessarily the same as the address in the RFC2822 From: field of the Email.
- However, the envelope sender is the address to which any Delivery Status Notifications get delivered
- The envelope recipient(s) in the SMTP Rcpt To: fields are also not necessarily the same as the recipients in the Message's To: and Cc: fields.
Think of the example of an email to an email list. It is composed
To: elist@address, and when it gets to the elist site the
elist software then
sends out the email message to all the people on the list, changing
the envelope recipients, and changing the envelope sender to
be the address of the elist admin people - so they get any DSN's.
(spammers just love the simple in SMTP :-)
- Email eventually reaches an SMTP server that actually delivers the email. How this is done is not actually defined. There are several commonly used formats for storing delivered mail:
- Mbox format - server prefixes the RFC822 message with a one line special header and appends this to a file designated as the users INBOX , see http://en.wikipedia.org/wiki/Mbox
- Proprietary Database usage e.g. Microsoft Exchange
- Mbox and Maildir are well known text based formats and make it easy to interface with Email Reading software. Standard Text tools can be press-ganged into use, diagnosing and fixing mail problems.
- User's mail software can use one or more of the following methods:
- direct access to the Mbox file or Maildir directory the email is delivered into.
- use a Web Interface to access the mail
- Proprietary method e.g. Microsoft Exchange
- Direct access is often not possible. POP/IMAP are client/server remote access methods - POP being the most commonly available.
- A simple protocol for picking up mail from a remote mail server. Very commonly implemented.
- provides facilities for
- authentication before allowing access
- querying status of mailbox
- getting summary list of contents of mailbox
- retrieving messages from mailbox
- deleting messages in mailbox
- most POP clients do not make full use of facilities POP provides - they usually just provide a service to download new messages, and to then optionally delete them.
- the downside to POP is that once the email has been downloaded it tends to be only available on the machine to which it has been downloaded.
- A more complex protocol for accessing and manipulating incoming mail and mail folders on the IMAP server.
- besides the basic facilities provide by POP, IMAP allows users to have mail folders reside on the server. An IMAP client can move mail between remote folders, or between local and remote folders, or even between folders on different IMAP servers.
- IMAP is expensive for ISPs to provide and hence is usually only available as a paid for extra service. Its big advantage is that the user has access to email in the server side folders from any machine they use, where ever they are. But messages can be downloaded whenever they are needed locally.
- The simplest client side solution - usually only a standard web browser is required.
- The mail resides remotely on the service providers servers, and is accessible from anywhere, including Internet Cafes etc.
- Downside is you are stuck with a fixed interface and facilities, the provider limits the amount of mail you can keep on their servers, dealing with attachments etc can be less than easy.
- many providers support Web access as well as POP access.
+-----------+
User's Machine |---------------->| SMTP |
+-------+ SMTP out | | Relay |-------> Outgoing
| |-----------| -------->| | SMTP mail
| | POP/IMAP | +-----------+
| |<-------------| |
+-------+ | | +-------------+
| |--------------| |
| Web Mail | |IMAP/ SMTP | Incoming
| +--------+ |---|POP Server|<----- SMTP
| | Web | | |Server | mail
|-----------------| Mail |<-| | |
| Server | | |
+--------+ +-------------+
HomePage http://www.franjam.org.uk
This document was generated using AFT v5.095