Friday, October 24, 2008

E-mail

Electronic mail, often abbreviated to e-mail, email, or originally eMail, is a store_and_forward method of writing, sending, receiving and saving messages over electronic communication systems. The term "e-mail" (as a noun or verb) applies to the Internet e-mail system based on the simple Mail Transfer Protocol, to network systems based on other protocols and to various mainframe,computer or internet by a particular systems vendor, or on the same protocols used on public networks.

Origin

E-mail predates the inception of the Internet, and was in fact a crucial tool in creating the Internet.

MIT first demonstrated the Compatible Time-sharing System (CTSS) in 1961.It allowed multiple users to log into the IBM 7094 from remote dial-up terminals, and to store files online on disk. This new ability encouraged users to share information in new ways. E-mail started in 1965 as a way for multiple users of a time-sharing mainframe computer to communicate. Although the exact history is murky, among the first systems to have such a facility were SCD's Q32and MIT's CTSS.

E-mail was quickly extended to become network e-mail, allowing users to pass messages between different computers by at least 1966 (it is possible that the SAGE system had something similar some time before).

The ARPANET computer network made a large contribution to the development of e-mail. There is one report that indicates experimental inter-system e-mail transfers began shortly after its creation in 1969. Ray Tomlinson initiated the use of the @ sign to separate the names of the user and their machine in 1971. The ARPANET significantly increased the popularity of e-mail, and it became the killer app of the ARPANET.


The diagram above shows a typical sequence of events that takes place when Alice composes a message using her mail user agent (MUA). She types in, or selects from an address book, the e-mail address of her correspondent. She hits the "send" button.

  1. Her MUA formats the message in Internet e-mail format and uses the Simple Mail Transfer Protocol (SMTP) to send the message to the local mail transfer agent (MTA), in this case smtp.a.org, run by Alice's Internet Service Provider (ISP).
  2. The MTA looks at the destination address provided in the SMTP protocol (not from the message header), in this case bob@b.org. An Internet e-mail address is a string of the form localpart@exampledomain.com, which is known as a Fully Qualified Domain Address (FQDA). The part before the @ sign is the local part of the address, often the username of the recipient, and the part after the @ sign is a domain name. The MTA looks up this domain name in the Domain Name System to find the mail exchange servers accepting messages for that domain.
  3. The DNS server for the b.org domain, ns.b.org, responds with an MX record listing the mail exchange servers for that domain, in this case mx.b.org, a server run by Bob's ISP.
  4. smtp.a.org sends the message to mx.b.org using SMTP, which delivers it to the mailbox of the user bob.
  5. Bob presses the "get mail" button in his MUA, which picks up the message using the Post Office Protocol (POP3).

This sequence of events applies to the majority of e-mail users. However, there are many alternative possibilities and complications to the e-mail system:

  • Alice or Bob may use a client connected to a corporate e-mail system, such as IBM Lotus Notes or Microsoft Exchange. These systems often have their own internal e-mail format and their clients typically communicate with the e-mail server using a vendor-specific, proprietary protocol. The server sends or receives e-mail via the Internet through the product's Internet mail gateway which also does any necessary reformatting. If Alice and Bob work for the same company, the entire transaction may happen completely within a single corporate e-mail system.
  • Alice may not have a MUA on her computer but instead may connect to a webmail service.
  • Alice's computer may run its own MTA, so avoiding the transfer at step 1.
  • Bob may pick up his e-mail in many ways, for example using the internet message access protocol, by logging into mx.b.org and reading it directly, or by using a webmail service.
  • Domains usually have several mail exchange servers so that they can continue to accept mail when the main mail exchange server is not available.
  • E-mail messages are not secure if e-mail encryption is not used correctly.

It used to be the case that many MTAs would accept messages for any recipient on the Internet and do their best to deliver them. Such MTAs are called open mail relays. This was important in the early days of the Internet when network connections were unreliable. If an MTA couldn't reach the destination, it could at least deliver it to a relay that was closer to the destination. The relay would have a better chance of delivering the message at a later time. However, this mechanism proved to be exploitable by people sending unsolicited bulk e-mail and as a consequence very few modern MTAs are open mail relays, and many MTAs will not accept messages from open mail relays because such messages are very likely to be spam.


Header

Each message has exactly one header, which is structured into fields. Each field has a name and a value. RFC 5322 specifies the precise syntax.

Informally, each line of text in the header that begins with a printable character begins a separate field. The field name starts in the first character of the line and ends before the separator character ":". The separator is then followed by the field value (the "body" of the field). The value is continued onto subsequent lines if those lines have a space or tab as their first character. Field names and values are restricted to 7-bit ASII characters. Non-ASCII values may be represented using MIME encoded words.

No comments: