19. Electronic Mail 19.1 Electronic mail Advantages Advantages ItIt isis normally normally much much cheaper cheaper than than using using the the telephone (although, as time equates to money for telephone (although, as time equates to money for most mostcompanies, companies,this thisrelates relatesany anysavings savingsor orcosts costs totoaauser’s typing speed). user’s typing speed). Many Manydifferent differenttypes typesofofdata datacan canbe betransmitted, transmitted, such as images, documents, speech, and such as images, documents, speech, andso soon. on. ItItisismuch faster than the postal service. much faster than the postal service. Users Users can can filter filter incoming incoming email email easier easier than than incoming telephone calls. incoming telephone calls. ItIt normally normally cuts cuts out out the the need need for for work work toto be be typed, edited and printed by a secretary. typed, edited and printed by a secretary. ItItreduces reducesthe theburden burdenon onthe themailroom. mailroom. ItIt isis normally more secure normally more secure than than traditional traditional methods. methods. ItItisisrelatively relativelyeasy easytotosend sendtotogroups groupsofofpeople people (traditionally, either a circulation list was required (traditionally, either a circulation list was required or oraacopy copytotoeveryone everyoneininthe thegroup groupwas wasrequired). required). ItItisisusually possible to determine whether usually possible to determine whetherthe the recipient has actually read the message (the recipient has actually read the message (the electronic electronic mail mail system system sends sends back back an an acknowledgement). acknowledgement). Disadvantages Disadvantages ItItstops stopspeople peopleusing usingthe thetelephone. telephone. ItItcannot be used as a legal cannot be used as a legaldocument. document. Electronic mail messages can Electronic mail messages canbe besent sentimpulsively impulsivelyand andmay may be later regretted (sending by traditional methods normally be later regretted (sending by traditional methods normally allows allowsfor foraarethink). rethink).InInextreme extremecases casesmessages messagescan canbe besent sent toto the wrong person (typically when replying to an email the wrong person (typically when replying to an email message, message,where whereaamessage messageisissent senttotothe themailing mailing list listrather rather than the originator). than the originator). ItIt may may be be difficult difficult toto send send toto some some remote remote sites. sites. Many Many organisations have either no electronic mail or merely organisations have either no electronic mail or merely an an intranet. Large companies are particularly wary of Internet intranet. Large companies are particularly wary of Internet connections connectionsand andlimit limitthe theamount amountofofexternal externaltraffic. traffic. Not everyone reads their electronic mail on Not everyone reads their electronic mail onaaregular regularbasis basis (although this is changing as more organisations adopt email (although this is changing as more organisations adopt emailasas the thestandard standardcommunications communicationsmedium). medium). Standards Standards Simple Simple Mail Mail Transfer Transfer Protocol Protocol (SMTP) (SMTP) –– which which isis used used with the TCP/IP protocol suite. It has traditionally been with the TCP/IP protocol suite. It has traditionally been limited limitedtotothe thetext-based text-basedelectronic electronicmessages. messages. Multipurpose Internet Mail Extension Multipurpose Internet Mail Extension (MIME) (MIME) –– which which allows the transmission and reception of mail that contains allows the transmission and reception of mail that contains various various types types ofof data, data, such such asas speech, speech, images images and and motion motion video. It is a newer standard than SMTP and uses much video. It is a newer standard than SMTP and uses muchofofits its basic protocol. basic protocol. S/MIME S/MIME(Secure (SecureMIME). MIME).RSA RSAData DataSecurity Securitycreated createdS/MIME S/MIME which supports encrypted email transfers and digitally which supports encrypted email transfers and digitallysigned signed electronic mail. electronic mail. 19.2 Email client/server or message transfer agent Post offices Message transfer agent forwards mail to the remote (store and forward) Local post office Mail message is forwarded to local post office Real-time remote transfer Message transfer agent Remote post office Message transfer by real-time transfers Local post office Real-time remote transfer Remote post office Real-time remote transfer MAPI MAPI (messaging (messaging API) API) –– Microsoft Microsoft part part ofof Windows Windows Operation Services Architecture. Operation Services Architecture. VIM VIM(vendor-independent (vendor-independentmessaging) messaging)––Lotus, Lotus,Apple, Apple,Novell Novell and Borland derived email API. and Borland derived email API. MHS MHS(message (messagehandling handlingservice) service)––Novell Novellnetwork networkinterface interface which is often used as an email gateway protocol. which is often used as an email gateway protocol. CMC CMC (common (common mail mail call) call) –– Email Email API API associated associated with with the the X.400 native messaging protocol. X.400 native messaging protocol. Post offices –– where where outgoing outgoing messages are temporally buffered messages are temporally buffered (stored) (stored) before before transmission transmission and and where incoming messages are stored. where incoming messages are stored. The The post post office office runs runs the the server server software capable of routing messages software capable of routing messages (a(a message message transfer transfer agent) agent) and and maintaining the post office database. maintaining the post office database. Message Message transfer transfer agents agents –– for for forwarding messages between post forwarding messages between post offices offices and and toto the the destination destination clients. clients. This software can either reside on This software can either reside onthe the local post office or on a physically local post office or on a physically separate separateserver. server. Gateways Gateways––which whichprovide providepart partofofthe the message transfer agent functionality. message transfer agent functionality. They Theytranslate translatebetween betweendifferent differentemail email systems, different email addressing systems, different email addressing schemes schemesand andmessaging messagingprotocols. protocols. Email clients – normally Email clients – normally the the computer which connects to the post computer which connects to the post office. office.ItItcontains containsthree threeparts: parts: Email API (Application Email API (Application Program Program Interface): MAPI, VIM, MHS Interface): MAPI, VIM, MHSand and CMC. CMC. Messaging Messaging protocol: protocol: SMTP/ SMTP/ X.400. X.400. Network Network transport transport protocol. protocol. Ethernet/ FDDI/etc. Ethernet/ FDDI/etc. 19.3 Email architecture Email client – Email client software Email server – Gateway software External connection Email server – Server post office software – Email database – Email message transfer agent – Email routing information – Directory synchronization Gateway Gatewayprotocols: protocols: MHS (used MHS (usedwith withNovell NovellNetWare). NetWare). SMTP.MIME (used with Internet SMTP.MIME (used with Internetenvironment). environment). X.400 (used with X.400). X.400 (used with X.400). MS Mail (used MS Mail (usedwith withMicrosoft MicrosoftMail). Mail). cc:Mail (used with Lotus cc:Mail). cc:Mail (used with Lotus cc:Mail). 19.4 SMTP (RFC 821) SMTP SMTPcommands: commands: domain HELO HELO domain MAIL sender-address MAILFROM: FROM:sender-address receiver-address RCPT FROM: RCPT FROM: receiver-address DATA DATA RSEY RSEY QUIT QUIT EXPN mailing-list EXPNmailing-list SEND FROM: sender-address SEND FROM:sender-address sender-address SOML FROM: SOML FROM: sender-address VRFY VRFYusername username HELO domain 250 OK MAIL FROM: sender 250 OK RCPT TO: receiver 250 OK DATA Sender 354 message LF CR LF CR 250 OK Receiver SMTP SMTPresponses: responses: 211 System 211 Systemstatus status 214 Help message 214 Help message 220 220 Service Serviceready ready 221 Service closing 221 Service closingtransmission transmission channel channel 250 Request 250 Requestmail mailaction actioncompleted completed successfully successfully 251 Addressed 251 Addresseduser userdoes doesnot notexist existon on system but will forward receiversystem but will forward receiveraddress address 354 Indicate 354 Indicatetotothe thesender senderthat thatthe themail mail message can now be sent. The end message can now be sent. The end ofofthe themessage messageisisidentified identifiedby bytwo two CR, LF characters CR, LF characters 421 Service 421 Serviceisisnot notavailable available 450 Mailbox unavailable 450 Mailbox unavailableand andthe the requested mail action was requested mail action wasnot not taken taken 19.5 Example (RFC821) >> mail mail -v -v w.buchanan@napier.ac.uk w.buchanan@napier.ac.uk Subject: Test Subject: Test This This is is aa test test message. message. Hello, Hello, how how are are you. you. Fred. Fred. EOT EOT w.buchanan@napier.ac.uk... w.buchanan@napier.ac.uk... Connecting Connecting to to central.napier.ac.uk. central.napier.ac.uk. (smtp)... (smtp)... 220 central.napier.ac.uk ESMTP Sendmail 8.9.1/8.9.1; Fri, 18 Dec 220 central.napier.ac.uk ESMTP Sendmail 8.9.1/8.9.1; Fri, 18 Dec 1998 1998 15:55:45 15:55:45 GMT GMT >>> >>> HELO HELO www.eece.napier.ac.uk www.eece.napier.ac.uk 250 250 central.napier.ac.uk central.napier.ac.uk Hello Hello bill_b@www.eece.napier.ac.uk bill_b@www.eece.napier.ac.uk [146.176.151.139], [146.176.151.139], pleased pleased to meet you to meet you >>> >>> MAIL MAIL From:<bill_b@www.eece.napier.ac.uk> From:<bill_b@www.eece.napier.ac.uk> 250 <bill_b@www.eece.napier.ac.uk>... 250 <bill_b@www.eece.napier.ac.uk>... Sender Sender ok ok >>> >>> RCPT RCPT To:<w.buchanan@napier.ac.uk> To:<w.buchanan@napier.ac.uk> 250 250 <w.buchanan@napier.ac.uk>... <w.buchanan@napier.ac.uk>... Recipient Recipient ok ok >>> DATA >>> DATA 354 354 Enter Enter mail, mail, end end with with "." "." on on aa line line by by itself itself >>> . >>> . 250 250 PAA24767 PAA24767 Message Message accepted accepted for for delivery delivery w.buchanan@napier.ac.uk... Sent (PAA24767 w.buchanan@napier.ac.uk... Sent (PAA24767 Message Message accepted accepted for for delivery) delivery) Closing connection to central.napier.ac.uk. Closing connection to central.napier.ac.uk. >>> >>> QUIT QUIT 221 central.napier.ac.uk 221 central.napier.ac.uk closing closing connection connection 19.6 RFC822 From From FREDB@ACOMP.CO.UK FREDB@ACOMP.CO.UK Wed Wed Jul Jul 55 12:36:49 12:36:49 1995 1995 Received: from ACOMP.CO.UK ([154.220.12.27]) Received: from ACOMP.CO.UK ([154.220.12.27]) by by central.napier.ac.uk (8.6.10/8.6.10) with SMTP central.napier.ac.uk (8.6.10/8.6.10) with SMTP id id MAA16064 MAA16064 for for <w.buchanan@central.napier.ac.uk>; <w.buchanan@central.napier.ac.uk>; Wed, Wed, 55 Jul Jul 1995 1995 12:36:43 12:36:43 +0100 +0100 Received: Received: from from WPOAWUK-Message_Server WPOAWUK-Message_Server by by ACOMP.CO.UK ACOMP.CO.UK with with Novell_GroupWise; Novell_GroupWise; Wed, Wed, 05 05 Jul Jul 1995 1995 12:35:51 12:35:51 +0000 +0000 Message Message Single text file sent Message-Id: Message-Id: <sffa8725.082@ACOMP.CO.UK <sffa8725.082@ACOMP.CO.UK >> X-Mailer: X-Mailer: Novell Novell GroupWise GroupWise 4.1 4.1 Date: Date: Wed, Wed, 05 05 Jul Jul 1995 1995 12:35:07 12:35:07 +0000 +0000 From: From: Fred Fred Bloggs Bloggs <FREDB@ACOMP.CO.UK> <FREDB@ACOMP.CO.UK> To: To: w.buchanan@central.napier.ac.uk w.buchanan@central.napier.ac.uk Subject: Subject: Technical Technical Question Question Status: Status: REO REO Dear Dear Bill Bill II have have aa big big problem. problem. Please Please help. help. Fred Fred RFC822 RFC822 header header Message Message RFC822 RFC822defines: defines: AA header header –– which which isis basically basically the the mail mail header header and and contains contains information for the successful transmission and delivery of a message. information for the successful transmission and delivery of a message. This Thistypically typicallycontains containsthe theemail emailaddresses addressesfor forsender senderand andreceiver, receiver,the the time the message was sent and received. Any computer involved in the time the message was sent and received. Any computer involved in the transmission transmissioncan canadded addedtotothe theheader. header. The contents. The contents. Message Message 19.7 Example email message showing RFC822 part 19.8 MIME (Multipurpose Internet Mail Extension ) SMTP SMTPdrawbacks: drawbacks: SMTP can SMTP canonly onlytransmit transmitASCII ASCIIcharacters charactersand and thus cannot transmit executable files or other thus cannot transmit executable files or other binary binaryobjects. objects. SMTP does SMTP doesnot notallow allowthe theattachment attachmentofoffiles, files, such as images and audio. such as images and audio. SMTP SMTPcan canonly onlytransmit transmit7-bit 7-bitASCII ASCIIcharacter character thus it does support an extended thus it does support an extended ASCII ASCII character set. character set. RFC1521/RFC1522 RFC1521/RFC1522(MIME) (MIME) Five new message header Five new message header fields fields inin the the RFC RFC 822 header, which provide extra information 822 header, which provide extra information about aboutthe thebody bodyofofthe themessage. message. Use of various content Use of various content formats formats toto support support multimedia electronic mail. multimedia electronic mail. Defined Defined transfer transfer encodings encodings for for transforming transforming attached files. attached files. MIME-Version: MIME-Version: 1.0 1.0 Content-Type: text/plain; Content-Type: text/plain; charset=us-ascii charset=us-ascii Content-Transfer-Encoding: Content-Transfer-Encoding: 7bit 7bit New Newheaders headers MIME-version MIME-version––aamessage messagethat thatconforms conformstotoRFC RFC 1521 or 1522 is MIME-version 1.0. 1521 or 1522 is MIME-version 1.0. Content-type Content-type––this thisfield fielddefines definesthe thetype typeofofdata data attached. attached. Content-transfer-encoding Content-transfer-encoding––this thisfield fieldindicates indicates the type of transformation necessary to represent the type of transformation necessary to represent the thebody bodyininaaformat formatwhich whichcan canbe betransmitted transmittedasasaa message. message. Content-id Content-id––this thisfield fieldisisused usedtotouniquely uniquelyidentify identify MIME multiple attachments in the email message. MIME multiple attachments in the email message. Content-description Content-description –– this this field field isis aa plain-text plain-text description of the object with the body. It description of the object with the body. Itcan canbe be used by the user to determine the data type. used by the user to determine the data type. Received: Received: from from pc419.eece.napier.ac.uk pc419.eece.napier.ac.uk by by ccmailgate.napier.ac.uk (SMTPLINK V2.11.01) ccmailgate.napier.ac.uk (SMTPLINK V2.11.01) ;; Fri, Fri, 24 24 Jan Jan 97 97 11:13:41 11:13:41 gmt gmt Return-Path: Return-Path: <w.buchanan@napier.ac.uk> <w.buchanan@napier.ac.uk> Message-ID: Message-ID: <32E90962.1574@napier.ac.uk> <32E90962.1574@napier.ac.uk> Date: Date: Fri, Fri, 24 24 Jan Jan 1997 1997 11:14:22 11:14:22 -0800 -0800 From: Dr William Buchanan <w.buchanan@napier.ac.uk> From: Dr William Buchanan <w.buchanan@napier.ac.uk> Organization: Organization: Napier Napier University University X-Mailer: X-Mailer: Mozilla Mozilla 3.01 3.01 (Win95; (Win95; I; I; 16bit) 16bit) MIME-Version: 1.0 MIME-Version: 1.0 To: To: w.buchanan@napier.ac.uk w.buchanan@napier.ac.uk Subject: Subject: Book Book recommendation recommendation Content-Type: Content-Type: text/plain; text/plain; charset=us-ascii charset=us-ascii Content-Transfer-Encoding: Content-Transfer-Encoding: 7bit 7bit 19.9 MIME content (mixed) MIME MIMEcontent contentheaders headers text/plain text/plain text/richtext text/richtext multipart/mixed multipart/mixed multipart/parallel multipart/parallel multipart/alternative multipart/alternative multipart/digest multipart/digest message/rfc822 message/rfc822 message/partial message/partial message/external-body message/external-body image/jpeg image/jpeg image/gif image/gif video/mpeg video/mpeg audio/basic audio/basic application/postscript application/postscript application/octet-stream application/octet-stream MIME MIMEcontent contentheaders headers From: Dr William From: Dr William Buchanan Buchanan <w.buchanan@napier.ac.uk> <w.buchanan@napier.ac.uk> MIME-Version: MIME-Version: 1.0 1.0 To: w.buchanan@napier.ac.uk To: w.buchanan@napier.ac.uk Subject: Subject: Any Any subject subject Content-Type: Content-Type: multipart/mixed; multipart/mixed; boundary=“boundary boundary=“boundary name” name” This part of the message This part of the message will will be be ignored. ignored. -boundary name -- boundary name Content-Type: Content-Type: multipart/mixed; multipart/mixed; boundary=“boundary boundary=“boundary name” name” This is the first mail This is the first mail message message part. part. -boundary name -- boundary name And And this this is is the the second second mail mail message message part. part. -boundary name --- boundary name -- 19.10 MIME content (partial) MIME MIMEcontent contentheaders headers text/plain text/plain text/richtext text/richtext multipart/mixed multipart/mixed multipart/parallel multipart/parallel multipart/alternative multipart/alternative multipart/digest multipart/digest message/rfc822 message/rfc822 message/partial message/partial message/external-body message/external-body image/jpeg image/jpeg image/gif image/gif video/mpeg video/mpeg audio/basic audio/basic application/postscript application/postscript application/octet-stream application/octet-stream ! ! Example ExampleMIME MIMEfile filewith with33fragments fragments(first (firstpart) part) From: Fred Bloggs <f.bloggs@toytown.ac.uk> From: Fred Bloggs <f.bloggs@toytown.ac.uk> MIME-Version: MIME-Version: 1.0 1.0 To: a.body@anytown.ac.uk To: a.body@anytown.ac.uk Subject: Subject: Any Any subject subject Content-Type: Content-Type: message/partial; message/partial; id=“xyz@toytown.ac.uk”; id=“xyz@toytown.ac.uk”; number=1; number=1; total=3 total=3 Content=type: Content=type: video/mpeg video/mpeg First First part part of of MPEG MPEG file file ! ExampleMIME MIMEfile filewith with33fragments fragments(second (secondpart) part) ! Example From: From: Fred Fred Bloggs Bloggs <f.bloggs@toytown.ac.uk> <f.bloggs@toytown.ac.uk> MIME-Version: MIME-Version: 1.0 1.0 To: To: a.body@anytown.ac.uk a.body@anytown.ac.uk Subject: Subject: Any Any subject subject Content-Type: Content-Type: message/partial; message/partial; id=“xyz@toytown.ac.uk”; id=“xyz@toytown.ac.uk”; number=2; number=2; total=3 total=3 Content=type: video/mpeg Content=type: video/mpeg Second Second part part of of MPEG MPEG file file ! ExampleMIME MIMEfile filewith with33fragments fragments(third (thirdpart) part) ! Example From: Fred Bloggs <f.bloggs@toytown.ac.uk> From: Fred Bloggs <f.bloggs@toytown.ac.uk> MIME-Version: MIME-Version: 1.0 1.0 To: a.body@anytown.ac.uk To: a.body@anytown.ac.uk Subject: Subject: Any Any subject subject Content-Type: Content-Type: message/partial; message/partial; id=“xyz@toytown.ac.uk”; id=“xyz@toytown.ac.uk”; number=3; number=3; total=3 total=3 Content=type: Content=type: video/mpeg video/mpeg Third Third part part of of MPEG MPEG file file 19.11 MIME encodings 7bit 7bit –– no no encoding, encoding, and and allall ofof the the characters characters are are 7-bit 7-bit ASCII ASCII characters. characters. 8bit 8bit––no noencoding, encoding,and andextended extended8-bit 8-bitASCII ASCIIcharacters charactersare areused. used. quoted-printable – encodes the data so that non-printing quoted-printable – encodes the data so that non-printing ASCII are Quotable-printable: ASCII characters characters (such (such asas line line feeds feeds and and carriage carriage returns) returns) are Quotable-printable: displayed in a readable form. Message displayed in a readable form. Message has has been been encoded encoded so so that that allall base64 ofof non-printing characters base64––encodes encodesby bymapping mapping6-bit 6-bitblocks blocksofofinput inputto to8-bit 8-bitblocks blocks non-printing characters have have been been output, all of which are printable ASCII characters. converted output, all of which are printable ASCII characters. converted to to printable printable characters. characters. AA x-token typical x-token––another anothernon-standard non-standardencoding encodingmethod. method. typical transform transform isis to to insert insert =xx =xx where where xxxx isis the hexadecimal equivalent for the hexadecimal equivalent for the the E.g. Content-transfer-encoding: quoted-printable ASCII character. A form feed (FF) would E.g. Content-transfer-encoding: quoted-printable ASCII character. A form feed (FF) would be beencoded encodedwith with‘=0C’ ‘=0C’ Bit value Encoded character Bit value Encoded character Bit value Encoded character Bit value Encoded character 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 A B C D E F G H I J K L M N O P 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Q R S T U V W X Y Z a b c d e f 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 g h i j k l m n o p q r s t u v 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 w x y z 0 1 2 3 4 5 6 7 8 9 + / 19.12 Just for fun Smilie Description Smilie Description :-) ;-) :.-) :-D :-P :-< :.-( :-@ :-X :-O O:-) :-/ :-x ?-( smile wink laughing tears laughing tongue sad weeping angry mute surprised/shocked halo sceptical kissing sorry, I don't know what went wrong stared too long at monitor unconscious bald punk chinese little girl robot wearing glasses / wide-eyed grin sunglasses on head moustache wig vampire boxer's nose robot variations on a theme (what?) laughter sad :-> :-))) ;-)=) :-} :-( :-I :-II }-) :-() =:-) :-3 :-Z :-* :*) sarcastic laughing or double chin grin wry smile sad, angry indifferent/sad angry evil talking shocked has eaten a lemon sleeping sorry, I didn't want to say that drunk (red nose) #-) :-Q .-) <:-) @:-) :-)-8 ::-) B-) .^) _O-) :-E (-: :) :] :} :@ :I dead smoking one-eyed stupid question (donkey’s hat) arab big girl wearing glasses horn-rimmed glasses side view aquanaut vampire left-handed happy gleep, friendly (what should we call these?) (what?) hmmm... %-) X-) (:-) -:-) <|-) 8:-) [:-] 8-) B:-) :<) {:-) :-[ :o) [:] =) :> :D :( 19.13 JFF Part II Acronym Description Acronym Description 2U2 AFAIK ASAP BOT BTW C4N CFV CUL DIY EOT FAI FOAF FYI GFC GTG HTH IC IMHO IMO to you, too as far as I know as soon as possible back on topic by the way ciao for now call for vote see you later do it yourself end of transmission frequently argued issue friend of a friend for your information going for coffee got to go hope this helps I see in my humble opinion in my opinion AAMOF AFK BBL BRB BYORL CFD CU CYA EOD F2F FAQ FWIW GAL GRMBL HAND IAC IDGI IMNSHO IMPE IMVHO in my very humble opinion in real life laughing out loud oh no, not again! on the other hand rolling on the floor laughing somebody had to say it thanks three letter acronym ta-ta for now what it is we do you get is what you pay for IOW as a matter of fact away from keyboard be back later be right back bring your own rocket launcher call for discussion see you see ya end of discussion face to face frequently asked questions for what it's worth get a life grumble have a nice day in any case I don’t get it in my not so humble opinion in my previous/personal experience in other words KISS NC OOTC REHI RTDox SO TIA TOS TTYL WWDWIIWD keep it simple stupid no comment obligatory on-topic content hello again (re-Hi!) read the documentation significant other thanks in advance terms of service talk to you later when we do what it is we do IRL LOL ONNA OTOH ROFL SHTSI THX TLA TTFN WIIWD YGWYPF