Electronic Mail Familiar to most of us What are the functions we expect? – Outgoing mail • Compose • send – compress – encrypt – Incoming Mail • • • • • • read forward repl store (retain) (and organize into folders, search, …) discard others???? The X.400 Functional Model User P2 UA UA MS P3 (ex: SMTP) P3 MTA MTS MHS P1 (ex: SMTP) User (ex: POP or IMAP) (ex: SMTP) AU MTA Other Services PDAU Postal Services Protocols User to the User Agent – local issue, no need to standardize P1: Message Transfer Agent interaction – concerned with routing and protection – not interested in message format or content P2: User Agent to User Agent – common packaging and interpretation of labels P3: Between the UA or MS and the MTA – hand over the message for safe delivery AU = Access Unit; PDAU = Physical Delivery Access Unit – non standard delivery, such as e-mail to fax, email to postal mail, etc. Sending a message Use DNS to get IP address of the destination mail server Establish a TCP/IP connection to the server (Optional) establish a SSL connection to the server Send header and message Ref: http://docs.iplanet.com/docs/manuals/messaging/nms41/ag/routing.htm#1017549 Routing a message 1. Queries the Directory Server to determine whether the recipient is local or remote. 2. If the recipient is local, delivers the message, typically placing it in the message store. Otherwise, proceeds to step 3. 3. If the recipient is remote: a. Queries DNS to find the MX (mail exchange) servers for the domain. b. Queries DNS to find the IP address of the remote messaging server. c. Establishes a TCP/IP connection to the remote messaging server. d. (Optional) Establishes an SSL connection to the remote messaging server. e. Sends the message to the remote messaging server (SMTP-Deliver). Ref: http://docs.iplanet.com/docs/manuals/messaging/nms41/ag/routing.htm#1017549 Retrieving a message To retrieve a message, the client must know the IP address of the messaging server, establish a connection to the server, then retrieve the message using one of the retrieval protocols: POP, IMAP, or HTTP. The following summarizes the steps the client takes to retrieve a message. 1.Queries DNS to find the IP address of the server. 2.Establishes a TCP/IP connection to the server. 3.(Optional) Establishes an SSL connection to the server. 4.Establishes a POP3, IMAP4, or HTTP connection to the server to retrieve the message. Ref: http://docs.iplanet.com/docs/manuals/messaging/nms41/ag/routing.htm#1017549 Characteristics User Interface – mail program environment • hints and clues about what to do next • reminders of folder names, aliases – set of individual commands to execute as needed • easy to incorporate mail functions into other programs Knowing about success or failure • failure can occur at any of several places in the mail delivery system Mail Interface Netscape Outlook unix mail Webmail Mail interface programs often provide other functions, such as calendars and to-do lists in the same system Mail system failures Subject: Re: SIGCSE 2000 sites Date: 10 Sep 98 09:57:08 -0400 From: ndale@cs.utexas.edu (Nell Dale) To: <beck> CC: Boots Cassel <cassel> My problem with the Arbaretum is its distance from the airport and town--and there is no public transportation to speak of. We will have to arrange buses to take people to and from the airport and to and from town. Taxis are not expensive, but are not used very much here. Nell This was actually a failure on our receiver mail system. It decided that the recipient of the message did not need to know the e-mail address of anyone except the sender of the message. It stripped off everything from the @ on. ( It is fixed now.) Problem with aliases . Subject: Re:VU-UD tickets Date: Wed, 22 Sep 1999 11:57:22 -0400 From: Dawn_Cassel@company.com To: wcassel@kemaconsulting.com CC: Dave@company.com, Kevin@company.com, Mom@company.com, Dick@company.com, AME@company.com <message> Here the problem is that the alias used locally is shown to the recipients. Those aliases are of no use in sending replies to this message Result Reporting Success reporting is usually optional Failure reports are more consistent – Unknown user at the destination site – Inability to find the destination site – Can find, but cannot connect to the destination site – Badly formed message not processed locally Status reporting – Verbose mode often available to show all the steps in mail delivery SMTP Workhorse of mail interaction Defines message format and transfer methods Uses TCP on port 25 Send mail to a MTA Send mail between MTAs The List of Reply Codes 211 System status, or system help reply 214 Help message [Information on how to use the receiver or the meaning of a particular non-standard command; t his reply is useful only to the human user] 452 Requested action not taken: insufficient system storage 500 Syntax error, command unrecognized [This may include errors such as command line too long] 501 Syntax error in parameters or argument 502 Command not implemented 220 <domain> Service ready 503 Bad sequence of commands 221 <domain> Service closing transmission channel 504 Command parameter not implemented 250 Requested mail action okay, completed 251 User not local; will forward to <forward-path> 550 Requested action not taken: mailbox unavailable [E.g., mailbox not found, no access] 354 Start mail input; end with <CRLF>.<CRLF> 551 421 <domain> Service not available, closing transmission channel [This may be a reply to any command if the service knows it must shut down] 450 Requested mail action not taken: mailbox unavailable [E.g., mailbox busy] User not local; please try <forward-path> 552 Requested mail action aborted: exceeded storage allocation 553 Requested action not taken: mailbox name not allowed [E.g., mailbox syntax incorrect] 554 Transaction failed 451 Requested action aborted: local error in processing Ref: http://raddist.rad.com/networks/1998/smtp/smtp.htm#commands2 11 monet:/mnt/a/cassel> mail -v cassel@acm.org Subject: test message Checking mail steps . EOT monet:/mnt/a/cassel> cassel@acm.org... Connecting to mail.acm.org. via esmtp. .. 220 mail.acm.org ESMTP Sendmail 8.9.3/8.9.3; Wed, 4 Oct 2000 14:47:43 -0400 From monet >>> EHLO monet.vill.edu 250-mail.acm.org Hello monet.csc.vill.edu [153.104.202.173], pleased to meet you 250-8BITMIME 250-SIZE 2000000 250-DSN 250-ONEX 250-XUSR 250 HELP >>> MAIL From:<cassel@monet.vill.edu> SIZE=81 250 <cassel@monet.vill.edu>... Sender ok >>> RCPT To:<cassel@acm.org> 250 <cassel@acm.org>... Recipient ok >>> DATA 354 Enter mail, end with "." on a line by itself >>> . 250 OAA201890 Message accepted for delivery cassel@acm.org... Sent (OAA201890 Message accepted for delivery) Closing connection to mail.acm.org. >>> QUIT 221 mail.acm.org closing connection From acm.org server Expanded Message Header Return-Path: <cassel@monet.csc.villanova.edu> Received: from mail.acm.org ([199.222.69.4]) by skinner.villanova.edu (Netscape Messaging Server 4.15) with ESMTP id G1X5J300.I88 for <Lillian.Cassel@villanova.edu>; Wed, 4 Oct 2000 14:47:27 -0400 Received: from monet.vill.edu (monet.csc.vill.edu [153.104.202.173]) by mail.acm.org (8.9.3/8.9.3) with ESMTP id OAA201890 for <cassel@acm.org>; Wed, 4 Oct 2000 14:47:43 -0400 Received: (from cassel@localhost) by monet.vill.edu (8.9.0/8.9.0) id OAA15022 for cassel@acm.org; Wed, 4 Oct 2000 14:47:44 -0400 (EDT) Date: Wed, 4 Oct 2000 14:47:44 -0400 (EDT) From: boots cassel <cassel@monet.csc.villanova.edu> Message-ID: <200010041847.OAA15022@monet.vill.edu> To: cassel@acm.org Subject: test message Addresses Local – same machine – same local network environment remote – same mail system on a remote host – different type of mail system Message Store Protocols Client interacting with a mail server (see RFC 1733) – offline • move mail from server to client machine – online • keep mail on server and stay connected – disconnected • keep mail on server • download a cache copy and disconnect • reconnect to synchronize client and server POP and IMAP Post Office Protocol see RFC 1725 and later revision – works on local copy on the client machine (offline access) – may leave copy on the server, but does not resynchronize Internet Message Access Protocol see RFC 1730 – allows all three interaction modes POP commands USER Client identifies mailbox to be downloaded PASS Password STAT Get number of messages and size of mailbox LIST N Return size of message N LAST Get highest message number accessed RETR N Retrieve a full message TOP N M Retrieve only headers and the first N lines DELE N Delete message QUIT Release service NOOP See if POP server is functioning RPOP Insecure authentication Offline, online, disconnected Offline is usual for ISPs. – They store your messages until you collect them, but don’t provide long term disk space to keep all your mail for you. Online works when the mail is delivered, read, and stored on the same system – You login, get your mail, read it, store it, go back to it when you want to. Disconnected – One copy on your local machine; master copy on a server – Access available while traveling, from home and office. – Long distance phone connections are minimized Mail Summary Early in the ARPAnet days, e-mail came to dominate usage With Web use, it remains a major contributor to traffic on the Internet The user interface to the mail system comes in many varieties Behind the scenes, a few message transfer systems deliver the mail