E-mails are becoming increasingly important in a world of connected phones and computers and laptops.
Be it a phone or a tablet or a spacecraft the e-mail protocol works using SMTP and its sister protocols like IMAP4, POP3 and underlying TCP layer. Not much has changed and spam control technologies, e-mail sending and receiving has more or less been the same in the last 20 years time. However I do find that gmail nowadays uses TLS, thereby encrypting the mail on the wire. SMTP authentication protocols are used in MS Outlook but if you use webmail then the backend may use it. You are not really aware. SMTP or e-mail protocol is a simple text based handshake involving encoded text even for binary attachments like video or PDF. These days you also find UTF8. But to transact mail it better be 7 bit ASCII. The conversions for MIME and encoding happens on the fly. You don't have a lot of complexity in the basic scheme of things. A mail flows by when you identify yourself, the IP and domain of the sender, the from address, to address, the mail body has the subject and headers and then you say bye with a "." on the starting line. For example, this is how you send mail on a UNIX command line. $ mail booty Subject: How are you? I am just testing, ignore. . $ So you see? You terminate the mail with a "." (fullstop) at the beginning of a line. On the wire side of things the SMTP protocol also does the same thing. You type a mail in Outlook or webmail then you click send,the mail server you are connected to collects the mail and transmits and terminates the sending with a full stop. If you attach a lot of images then your mail message becomes a MIME encoded text. It has various sections demarcated by a random string like: -sdlfijalfdkjslfkjsldkfjdslfkjsldjjjjjjjjjjjjj- Content-type: image/png ... .. -sdlfijalfdkjslfkjsldkfjdslfkjsldjjjjjjjjjjjjj- Content-type: audio/mpeg -sdlfijalfdkjslfkjsldkfjdslfkjsldjjjjjjjjjjjjj- Like that. On the receiving side, the mail server stores the mail without interpretation. It could run virus scanning or spam control. But you receive mail in your inbox or web mail by using a protocol called IMAP or POP3. These are LDA, local delivery agents. And the mails are stored in the mail server using what is called maildir format. Each mail is stored in three directories, new/ , /tmp and /cur These directories facilitate locking when writing to the mail spool/queue. The old idea of storing all mails in one single file(mbox format) with the From: line demarcating is not a good idea. It does not scale. In the maildir idea pioneered by Dan Bernstein the mails are stored in its own individual files. When a mail client reads them using IMAP, the client interprets the mail MIME encoding and extracts attachments. Even HTML mail is encoded. -Girish _______________________________________________ ILUGC Mailing List: http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
