For non technical people, e-mail and instant messaging are the window to the Internet. Give them an e-mail client, even a web based interface and they will marvel at the ability to interact with anyone on this planet.
Today's e-mail clients come with support for various non textual modes of communication. You can send any binary data as attachment including mp3 songs, movies, pdf documents and so on. But text remains as the primary means of communicating with each other.
In fact most mailing lists do not even support html mails. It is only plaintext and that too wrapped at 72 characters. Mailing lists are a separate topic in itself and auto-generated mails and robots that respond to mails form part of sophisticated mail solutions.
Let us begin by taking a look at this diagram.
The interface with which you send and receive mails is called the MUA or mail user agent. This is a simple editor and pager that merely helps you type and read mail. This program queues outgoing mail to be sent by SMTP. For incoming mails, it relies on an IMAP/POP3 client.
The most complex component is the MTA or mail transfer agent. Haven\'t you heard of sendmail?
It is a beast with multiple responsibilties and roles. High load servers handle thousands of mails in a day and most of the bandwidth is consumed by these folks. Of course with spam in the picture, bandwidth hog is certainly becoming an issue not to mention wasted storage space in the server.
Sending mail involves communicating with the domain part of the mail address and delivering the mail to the user before the @ in the address. For instance, if you mail me (firstname.lastname@example.org), you open an SMTP connection to gmail.com and deliver to user "girish1729."
Once the mail is stored at the gmail server, I can retrieve it using either of POP3 or IMAP4. POP is a really simple protocol with bare bones support for retrieving emails in bulk.
IMAP is a very sophisticated protocol with in built support for folders and querying various headers. You need not download the whole bunch of mails to read one or two important short mails.
The procmail MDA(mail delivery agent) is a very popular way to process incoming mails automatically. You can deliver it to specific folders one corresponding to each mailing list or play a sound or popup for incoming mail. Of course you can also invoke the vacation program using it or write your own.
Much more can be done. I combined procmail with the dict client for automatically responding to mails with the word to be looked up as subject.
SMTP rfc, the famed rfc822 defines a bunch of headers in the each e-mail envelope. All the programs I discussed above concern only with the headers. But only ASCII was allowed in the body of the message.
It is only anti spam and anti virus software that reads the body of the mail in addition to the headers of course.
Things changed with the introduction of MIME(Multi Purpose Internet Mail Extension) and now we can send any data as attachment.
PGP introduced strong crypto to e-mails and SMIME and GPG which is another PGP alternative give you enough choices for encrypted e-mail sending and receiving.
Mixmaster on linux gives you an infrastructure for anonymous sending and receiving of mails. Mutt plays well with most of these tools.
Mailboxes on UNIX systems offer you several formats. mbox, Maildir, MH and MMDF are the choices but for heavy-duty purposes like listening to multiple mailing lists, maildir is a good choice to make.
The UNIX command line when combined with email gets really powerful andwe shall talk about it in enough detail in the second part.