In this article, we consider electronic mail service and the protocols that support it. An electronic mail (e-mail) facility allows users to send small notes or large voluminous memos across the Internet. E-mail is popular because it offers a fast, convenient method of transferring information and communicating.
Simple Mail Transfer Protocol (SMTP)
The Simple Mail Transfer Protocol (SMTP) provides a basic e-mail facility. SMTP is the protocol that transfers e-mail from one server to another. It provides a mechanism for transferring messages among separate servers. Features of SMTP include mailing lists, return receipts and forwarding.
SMTP accepts the incoming message and makes use of TCP to send it to an SMTP module on another servers. The target SMTP module will make use of a local electronic mail package to store the incoming message in a user’s mailbox.
Once the SMTP server identifies the IP address for the recipient’s e-mail server, it sends the message through standard TCP/IP routing procedures. Since SMTP is limited in its ability to queue messages at the receiving end, it’s usually used with one of two other protocols, POP3 or IMAP, that let the user save messages in a server mailbox and download them periodically from the server.
In other words, users typically use a program that uses SMTP for sending e-mail and either POP3 or IMAP for receiving messages that have been received for them at their local server. Most mail programs (such as Eudora) let you specify both an SMTP server and a POP server.
On UNIX-based systems, sendmail is the most widely-used SMTP server for e-mail. Earlier versions of sendmail presented many security risk problems. Through the years, however, sendmail has become much more secure, and can now be used with confidence.
A commercial package, sendmail, includes a POP3 server and there is also a version for Windows NT. Hackers often use different forms of attack with SMTP. A hacker might create a fake e-mail message and send it directly to an SMTP server. Other security risks associated with SMTP servers are denial-of-service attacks.
Hackers will often flood an SMTP server with so many e-mails that the server cannot handle legitimate e-mail traffic. This type of flood effectively makes the SMTP server useless, thereby denying service to legitimate e-mail users. Another well-known risk of SMTP is the sending and receiving of viruses and Trojan horses.
The information in the header of an e-mail message is easily forged. The body of an e-mail message contains standard text or a real message. Newer e-mail programs can send messages in HTML format. No viruses and Trojans can be contained within the header and body of an e-mail message, but they may be sent as attachments.
The best defence against malicious attachments is to purchase an SMTP server that scans all messages for viruses, or to use a proxy server that scans all incoming and outgoing messages.
SMTP is usually implemented to operate over TCP port 25. The details of SMTP are in RFC 2821 of the Internet Engineering Task Force (IETF). An alternative to SMTP that is widely used in Europe is X.400.
Post Office Protocol Version 3 (POP3)
The most popular protocol used to transfer e-mail messages from a permanent mailbox to a local computer is known as the Post Office Protocol version 3 (POP3). The user invokes a POP3 client, which creates a TCP connection to a POP3 server on the mailbox computer.
The user first sends a login and a password to authenticate the session. Once authentication has been accepted, the user client sends commands to retrieve a copy of one or more messages and to delete the message from the permanent mailbox. The messages are stored and transferred as text files in RFC 2822 standard format.
Note that computers with a permanent mailbox must run two servers – an SMTP server accepts mail sent to a user and adds each incoming message to the user’s permanent mailbox, and a POP3 server allows a user to extract messages from the mailbox and delete them.
To ensure correct operation, the two servers must coordinate with the mailbox so that if a message arrives via SMTP while a user extracts messages via POP3, the mailbox is left in a valid state.
Internet Message Access Protocol (IMAP)
The Internet Message Access Protocol (IMAP) is a standard protocol for accessing email from your local server. IMAP4 (the latest version) is a client–server protocol in which e-mail is received and held for you by your Internet server.
You (or your e-mail client) can view just the subject and the sender of the e-mail and then decide whether to download the mail. You can also create, manipulate and delete folders or mailboxes on the server, delete messages or search for certain e-mails.
IMAP requires continual access to the server during the time that you are working with your mail. A less sophisticated protocol is Post Office Protocol 3 (POP3). With POP3, your mail is saved for you in your mailbox on the server. When you read your mail, it is immediately downloaded to your computer and no longer maintained on the server.
IMAP can be thought of as a remote file server. POP can be thought of as a ‘storeand- forward’ service. POP and IMAP deal with receiving e-mail from your local server and are not to be confused with SMTP, a protocol for transferring e-mail between points on the Internet.
You send e-mail by SMTP and a mail handler receives it on your recipient’s behalf. Then the mail is read using POP or IMAP.
Multipurpose Internet Mail Extension (MIME)
The Multipurpose Internet Mail Extension (MIME) is defined to allow transmission of non-ASCII data via e-mail. MIME allows arbitrary data to be encoded in ASCII and then transmitted in a standard e-mail message. SMTP cannot be used for languages that are not supported by seven-bit ASCII characters.
It cannot also be used for binary files or to send video or audio data. MIME is a supplementary protocol that allows non-ASCII data to be sent through SMTP. MIME is a set of software functions that transforms non-ASCII data to ASCII data and vice versa.