How They Work: How Emails Work – Part II

The SMTP server understands very simple text commands like HELO, MAIL, RCPT and DATA. The most common commands are as follows:- HELO - introduce yourself, EHLO - introduce yourself and request extended mode, MAIL FROM: - specify the sender, RCPT TO: - specify the recipient, DATA - specify the body of the message (To, From and Subject should be the first three lines.), RSET – reset, QUIT - quit the session, HELP - get help on commands, VRFY - verify an address, EXPN - expand an address and VERB – verbose.

Saturday, October 29, 2011

The SMTP server understands very simple text commands like HELO, MAIL, RCPT and DATA.

The most common commands are as follows:- HELO - introduce yourself, EHLO - introduce yourself and request extended mode, MAIL FROM: - specify the sender, RCPT TO: - specify the recipient, DATA - specify the body of the message (To, From and Subject should be the first three lines.), RSET – reset, QUIT - quit the session, HELP - get help on commands, VRFY - verify an address, EXPN - expand an address and VERB – verbose.

On the other hand, the POP3 and IMAP Servers operate as follows; In the simplest implementations of POP3, the server really does maintain a collection of text files, one for each e-mail account.

When a message arrives, the POP3 server simply appends it to the bottom of the recipient's file.  When you check your e-mail, your e-mail client connects to the POP3 server using port 110. The POP3 server requires an account name and a password. Once you've logged in, the POP3 server opens your text file and allows you to access it.

Like the SMTP server, the POP3 server understands a very simple set of text commands. Here are the most common commands; USER - enter your user ID, PASS - enter your password, QUIT - quit the POP3 server, LIST - list the messages and their size, RETR - retrieve a message, pass it a message number, DELE - delete a message, pass it a message number, TOP - show the top x lines of a message, pass it a message number and the number of lines.

Your e-mail client connects to the POP3 server and issues a series of commands to bring copies of your e-mail messages to your local machine (computer or device). Generally, it will then remove the messages from the server (unless you've told the e-mail client to leave a copy).

The POP3 server simply acts as an interface between the e-mail client and the text file containing your messages. You can see that the POP3 server is extremely simple. You can connect to it through telnet at port 110 and issue the commands yourself if you would like to and it will allow you to access your E-mails.

On the other hand, IMAP Server works somehow differently from the POP3, as you can see, the POP3 protocol is very simple. It allows you to have a collection of messages stored in a text file on the server.

Your e-mail client (e.g. Outlook or Entourage) can connect to your POP3 e-mail server and download the messages from the POP3 text file onto your local device. That is nearly all that you can do with POP3. 

Many users want to do far more than that with their e-mail, and they want their e-mail to remain on the server. The main reason for keeping your e-mail on the server is to allow users to connect from a variety of machines.

With POP3, once you download your e-mail it's stuck on the machine to which you downloaded it.

If you wanted to read your e-mail both on your desktop PC and laptop (depending on whether you're working in the office or on the road), POP3 could make it a little bit difficult.

IMAP (Internet Mail Access Protocol) is a more advanced protocol that solves the shortcomings encountered in POP3, with IMAP, your mail stays on the e-mail server. You can organize your mail into folders, and all the folders live on the server as well.

When you search your e-mail, the search occurs on the server machine, rather than on your machine. This approach makes it extremely easy for you to access your e-mail from any machine, and regardless of which machine you use; you have access to all of your mail in all of your folders.

eddie@afrowebs.com