Title: Applications
1Applications
2Host Names (DNS)
3Overview
- Names versus Addresses
- names are variable length, mnemonic, easy for
humans to remember - addresses are fixed length, tied to routing, and
easy for computers to process - Name Space
- defines set of possible names
- flat versus hierarchical
- consists of a set of name to value bindings
4Address Assignment
- Network Information Center (NIC) used to maintain
all name to address bindings - Limited scalability
- Distributed name servers now used
5(No Transcript)
6Domain Hierarchy
- Example hierarchy
- Example name cheltenham.cs.arizona.edu
7Name Servers
- Partition hierarchy into zones
- Each zone implemented by two or more name servers
8Resource Records
- Each name server maintains a collection of
resource records - ltName, Value, Type, Class, TTLgt
- Name/Value not necessarily host names to IP
addresses - Type
- NS the Value field gives the domain name for a
host running a name server that knows how to
resolve names within the specified domain. - CNAME the Value field gives the canonical name
for a particular host it is used to define
aliases. - MX the Value field gives the domain name for a
host running a mail server that accepts messages
for the specified domain. - Class allow other entities to define types
- TTL how long the resource record is valid
9Example
- The edu Root server has a record for each second
level server - ltarizona.edu, telcom.arizona.edu, NS, INgt
- lttelcom.arizona.edu, 128.196.128.233, A, INgt
- ltbellcore.com, thumper.bellcore.com, NS, INgt
- ltthumper.bellcore.com, 128.96.32.20, A, INgt
10Arizona server
- ltcs.arizona.edu, optima.cs.arizona.edu, NS, INgt
- ltoptima.cs.arizona.edu, 192.12.69.5, A, INgt
- Third level name server
- ltece.arizona.edu, helios.ece.arizona.edu, NS, INgt
- lthelios.ece.arizona.edu, 128.196.28.166, A, INgt
- Third level name server
- ltjupiter.physics.arizona.edu, 128.196.4.1, A, INgt
- ltsaturn.physics.arizona.edu, 128.196.4.2, A, INgt
- ltmars.physics.arizona.edu, 128.196.4.3, A, INgt
- ltvenus.physics.arizona.edu, 128.196.4.4, A, INgt
- Final address records
11CS server
- ltcs.arizona.edu, optima.cs.arizona.edu, MX, INgt
- Mail server for domain translation
- ltcheltenham.cs.arizona.edu, 192.12.69.60, A, INgt
- ltche.cs.arizona.edu, cheltenham.cs.arizona.edu,
CNAME, INgt - Alias definition
- ltoptima.cs.arizona.edu, 192.12.69.5, A, INgt
- ltopt.cs.arizona.edu, optima.cs.arizona.edu,
CNAME, INgt - ltbaskerville.cs.arizona.edu, 192.12.69.35, A, INgt
- ltbas.cs.arizona.edu, baskerville.cs.arizona.edu,
CNAME, INgt
12Name Resolution
- Strategies
- forward
- iterative
- recursive
- Local server
- need to know root at only one place (not each
host) - site-wide cache
13Names
- Domain Name used by humans
- Translated to IP number by name server
- IP number used to route in internet
- Forwarding occurs until packet reaches physical
network - ARP is used to translate into a physical address
- Physical address is unique and will be used to
direct the packet to the correct machine
14SMTP
Mail
Mail gateway
Mail
reader
reader
Mail
Mail
Mail
daemon
daemon
daemon
SMTP/TCP
SMTP/TCP
15A Typical Mail Environment
SMTP
IMAP
Mail Server
Mail Server
Mail Client
SMTP
SMTP
POP
Mail Client
16Email is defined by RFC 821 and RFC 822
- Internet email, that is not to be confused with
LAN email such as ccMail or MS Mail, which use
proprietary protocols - RFC 821 defines the SMTP protocol
- How mail MTAs exchange messages
- RFC 822 defines what a mail message looks like
17How Email Really Works
Your Computer
My computer
Hey, Ive got some mail here! Anybody home?
(yawn) Yeah, yeah, Im here...
This is for Joe Schmoe - you know him?
Ill take it ...
OK, here it comes!
Got it!
See ya later!
Bye!
18SMTP looks exactly like this
- telnet/port25 arizona.edu
- Trying... Connected to ARIZONA.EDU.
- 220 Arizona.EDU -- Server ESMTP (PMDF V4.3-10
2381) - helo opus1.com
- 250 Arizona.EDU OK, Tennis.Opus1.COM.
- mail fromlttrumbo_at_opus1.comgt
- 250 Address Ok.
- rcpt toltface_at_arizona.edugt
- 250 face_at_arizona.edu OK.
- data
- 354 Enter mail, end with a single ".".
- This is where all the rest of the headers go ...
- .
- 250 Ok.
- quit
- 221 Bye received. Goodbye.
red sending mailer blue receiving mailer
19The Commands areFew and Specific
- telnet/port25 arizona.edu
- Trying... Connected to ARIZONA.EDU.
- 220 Arizona.EDU -- Server ESMTP (PMDF V4.3-10
2381) - helo opus1.com
- 250 Arizona.EDU OK, Tennis.Opus1.COM.
- mail fromlttrumbo_at_opus1.comgt
- 250 Address Ok.
- rcpt toltface_at_arizona.edugt
- 250 face_at_arizona.edu OK.
- data
- 354 Enter mail, end with a single ".".
- This is where all the rest of the headers go ...
- .
- 250 Ok.
- quit
- 221 Bye received. Goodbye.
20SMTP Reply Codes
- telnet/port25 arizona.edu
- Trying... Connected to ARIZONA.EDU.
- 220 Arizona.EDU -- Server ESMTP (PMDF V4.3-10
2381) - helo opus1.com
- 250 Arizona.EDU OK, Tennis.Opus1.COM.
- mail fromlttrumbo_at_opus1.comgt
- 250 Address Ok.
- rcpt toltface_at_arizona.edugt
- 250 face_at_arizona.edu OK.
- data
- 354 Enter mail, end with a single ".".
- This is where all the rest of the headers go ...
- .
- 250 Ok.
- quit
- 221 Bye received. Goodbye.
21Reply Codes Contain a Lot of Information
The first digit indicates success, failure, or
incomplete
The third digit is the specific message for that
category
The second digit is the category of error message
In fact, only the reply codes count. Other
information in a reply is purely for human
consumption.
22Most Common Reply Codes
- 500 Syntax error, command unrecognized
- 501 Syntax error in parameters or arguments
- 502 Command not implemented
- 503 Bad sequence of commands
- 220 ltdomaingt Service ready
- 221 ltdomaingt Service closing transmission channel
- 421 ltdomaingt Service not available, closing
transmission channelThis may be a reply to any
command if the service knows it must shut down - 250 Requested mail action okay, completed
- 354 Start mail input end with ltCRLFgt.ltCRLFgt
- 550 Requested action not taken mailbox
unavailableE.g., mailbox not found, no access - 553 Requested action not taken mailbox name not
allowedE.g., mailbox syntax incorrect - 554 Transaction failed
The first digit indicates status 1 -
3 success 4 temp negative 5 failure
The second digit is type of error 0 syntax 2 conn
ection 5 mail
23RFC821 Defines all the Reply Codes
- The numeric codes are definitive
- The text is just for us humans
- Most mailers follow the RFC821 suggeted text, but
some of them get fun and creative - You cant make up new reply codes for a special
situation - Thats what being a protocol is all about
24How to Forge Email
- telnet/port25 arizona.edu
- Trying... Connected to ARIZONA.EDU.
- 220 Arizona.EDU -- Server ESMTP (PMDF V4.3-10
2381) - helo big.brother
- 250 Arizona.EDU OK, Tennis.Opus1.COM.
- mail fromltwatcher_at_Arizona.EDUgt
- 250 Address Ok.
- rcpt tolttrumbo_at_Arizona.EDUgt
- 250 trumbo OK.
- data
- 354 Enter mail, end with a single ".".
- Do you know where your kids are at 10 pm??
- .
- 250 Ok.
- quit
- 221 Bye received. Goodbye.
- Connection closed by Foreign Host
25... and the resultant raw mail
- Return-path ltwatcher_at_Arizona.EDUgt
- Received from big.brother (Tennis.Opus1.COM)
- by Arizona.EDU (PMDF V4.3-10 2381) id
lt01HQ2SPP1T68A8CC48_at_Arizona.EDUgt Wed, - 03 May 1995 191747 -0700 (MST)
- Date Wed, 03 May 1995 191747 -0700 (MST)
- Date-warning Date header was inserted by
Arizona.EDU - From watcher_at_Arizona.EDU
- To trumbo_at_Arizona.EDU
- Message-id lt01HQ2SQE2ZKYA8CC48_at_Arizona.EDUgt
- Do you know where your kids are at 10 pm??
26Using VRFY/EXPN
- telnet/port25 cs.arizona.edu
- Trying... Connected to OPTIMA.CS.ARIZONA.EDU, a
SUN-4/75 running SUN4.1.1. - 220 optima.cs.arizona.edu Sendmail 5.65c/15 ready
at Fri, 4 Dec 1994 142153 MST - vrfy ric
- 250 Ric Anderson ltricgt
- expn live-music
- 550 live-music... User unknown
- expn live_music
- 250-ltmenze_at_universgt
- 250-ltcliff_at_javelinagt
- 250-lttrumbo_at_arizona.edugt
- 250-ltFICO_at_arizona.edugt
- ...
- 250 ltface_at_dirnet.ccit.arizona.edugt
- quit
- 221 optima.cs.arizona.edu closing connection
27Beware of vrfyon some mailers!
- telnet/port25 arizvm1.ccit.arizona.edu
- Trying... Connected to ARIZVM1.CCIT.ARIZONA.EDU,
an IBM 3090-300E running VM/XA. - 220 ARIZVM1.ccit.arizona.edu running IBM VM SMTP
V2R2 on Sun, 09 Oct 94 135011 MST - vrfy foo
- 250 ltfoo_at_ARIZVM1.ccit.arizona.edugt via
MAILER_at_ARIZVM1 - vrfy blatz
- 250 ltblatz_at_ARIZVM1.ccit.arizona.edugt via
MAILER_at_ARIZVM1 - vrfy thiscouldnotbearealusername
- 250 ltthiscouldnotbearealusername_at_ARIZVM1.ccit.ariz
ona.edugt via MAILER_at_ARIZVM1 - vrfy taryn
- 250 lttaryn_at_ARIZVM1.ccit.arizona.edugt via
MAILER_at_ARIZVM1 - quit
- 221 ARIZVM1.ccit.arizona.edu running IBM VM SMTP
V2R2 closing connection - Connection closed by Foreign Host
28SMTP Extensions (EHLO)
- After careful consideration, a few extensions
have been added to the SMTP protocol - A mailer supporting extensions uses EHLO instead
of HELO in the greeting - The server will respond to indicate it can
negotiate extensions - If the server gives a failure to the EHLO, the
client SMTP reverts back to plain ol SMTP - Sometimes called the eight-bit HELO, but other
extensions are included as well - Described in RFC1651
29An EHLO with Extensions
- telnet/port25 dbc.mtview.ca.us
- Trying... Connected to DBC.MTVIEW.CA.US, a
SUN-SPARC running UNIX. - 220 dbc.mtview.ca.us SMTP server ready.
- ehlo
- 250-Hello , pleased to meet you
- 250-HELP
- 250-SIZE
- 250-XONE
- 250-XVRB
- 250 XQUE
- quit
- 221 dbc.mtview.ca.us closing connection
- Connection closed by Foreign Host
A mailer that supports extensions responds with a
list of which ones it can do
30EHLO with an Old Mailer
- telnet/port25 arizvm1.ccit.arizona.edu.
- Trying... Connected to ARIZVM1.CCIT.ARIZONA.EDU,
an IBM 3090-300E running VM/XA. - 220 ARIZVM1.ccit.arizona.edu running IBM VM SMTP
V2R2 on Tue, 25 Apr 95 21091T - ehlo arizona.edu
- 500 Unknown command, 'ehlo'
31Defined SMTP Extensions
- The non-required SMTP command set
- Service Ext EHLO Keyword Parameters Verb
Added Behavior - ------------- ------------ ----------
---------- ------------------ - Send SEND none
SEND defined in RFC 821 - Send or Mail SOML none SOML
defined in RFC 821 - Send and Mail SAML none SAML
defined in RFC 821 - Expand EXPN none
EXPN defined in RFC 821 - Help HELP none
HELP defined in RFC 821 - Turn TURN none
TURN defined in RFC 821 - Later additions, defined in other RFCs
- EHLO RFC1651 SMTP Service Extensions
- 8BITMIME RFC1652, SMTP Service Extension for
8bit-MIME transport - SIZE RFC1653, SMTP Service Extension for
Message Size Declaration - X extensions (defined to be undefined)
32SMTP ProtocolKey Concepts
- Get copies of the RFCs and have them on-disk and
on-desk for easy perusal - You need to know the basics of SMTP by heart
- Using SMTP as a debugging tool is a favorite
technique of effective postmasters
33DECUS Fall 1996 Barcelona
RFC-822 Email Headers and How to Read Them
34A TypicalMail Message
- Return-path ltCAPUTO_at_decus.orggt
- Received from DIRECTORY-DAEMON by
Spring.Tucson.AZ.US (PMDF V4.3-12 2381) - id lt01HPLO2VX9YO934XSG_at_Spring.Tucson.AZ.USgt
Fri, - 21 Apr 1995 130023 -0700 (MST)
- Received from Topaz.DECUS.Org by
Spring.Tucson.AZ.US (PMDF V4.3-12 2381) - id lt01HPLO2XDUE891WFCC_at_Spring.Tucson.AZ.USgt
Fri, - 21 Apr 1995 130025 -0700 (MST)
- Received from mr.decus.org by DECUS.Org (PMDF
V4.2-13 7924) - id lt01HPLU4NRVK09APFGQ_at_DECUS.Orggt Fri, 21 Apr
1995 155347 EST - Received with PMDF-MR Fri, 21 Apr 1995 154610
GMT - MR-Received by mta TOPAZ Relayed Fri, 21 Apr
1995 154610 0000 - Alternate-recipient prohibited
35A Typical Mail Message (continued)
- Subject Seminar S306
- To trumbo_at_Opus1.COM, jms_at_Opus1.COM
- Message-id ltE437ZVSNMJW0T/RTOPAZ/RA1/UCAPUTO/
_at_MHSgt - MIME-version 1.0
- Content-type TEXT/PLAIN CHARSETUS-ASCII
- Content-transfer-encoding 7BIT
- Posting-date Fri, 21 Apr 1995 204600 0000
(GMT) - Importance normal
- Priority normal
- Sensitivity Company-Confidential
- UA-content-id E437ZVSNMJW0T
- X400-MTS-identifier 01645112405991/423375_at_TOPAZ
- A1-type MAIL
- Hop-count 0
- Jan and Joel, your seminar is a GO with an
attendee count of 10. - See ya there!
- -Gloria
36Some Headers are More Important than Others
- Required headers
- From Resent-From
- Date Resent-Date
- one recipient address
- To Resent-To
- cc Resent-cc
- bcc Resent-bcc
- (Blind carbon copy)
- From IN"SYSTEM_at_Arizona.EDU"
- To IN"trumbo_at_Arizona.EDU"
- Date Thu, 20 Apr 1995 010024 -0700 (MST)
37Anatomy of a Mail Message
Order of headers is not important
Some headers are required
Return-path ltSYSTEM_at_Arizona.EDUgt Received from
Arizona.EDU by Arizona.EDU (PMDF V4.3-10 2381)
id lt01HPJKMXKY1C9JEUK1_at_Arizona.EDUgt Thu, 20 Apr
1995 010024 -0700 (MST) Date Thu, 20 Apr 1995
010024 -0700 (MST) From SYSTEM_at_Arizona.EDU Subj
ect Scheduler Job 23 (NAME TMS-CHECK-DAILY-MVS-
JOBS) finished, Status NONAME-W-NOMSG, Message
number 00000000 To trumbo_at_Arizona.EDU Message-id
lt01HPJKMXLHBM9JEUK1_at_Arizona.EDUgt X-VMS-To
TMS_DBA
X headers are for private use
Blank line separates message body
Job TMS-CKECK-DAILY-MVS-JOBS complete. Status
NONAME-W-NOMSG, Message number
00000000 Return-path ltSYSTEM_at_Arizona.EDUgt Receiv
ed from Arizona.EDU by Arizona.EDU (PMDF V4.3-10
2381) id lt01HPJKMXKY1C9JEUK1_at_Arizona.EDUgt Thu,
20 Apr 1995 010024 -0700 (MST)
Headers at the bottom dont count as headers
38Originator Headers who it comes from
- From Resent-From
- The agent (person, system or process) that
created the message. Should be a single,
authenticated machine address generated by the
sending agent.
39Originator Headerswho sent it on to you
- Sender Resent-Sender
- The agent (person, system or process) that sends
the message. Intended for use when the sender is
not the author of the message, or is one of a
group of authors. Not to be used if identical
to From field. The Sender field must be present
if different from the From field. - Used by lists in this way
- From "Frits A.M. Storms" ltSTO_at_MH.NLgt
- Sender INFO-VAX Discussion ltINFO-VAX_at_UGA.BITNETgt
- To Multiple recipients of list INFO-VAX
ltINFO-VAX_at_UGA.BITNETgt
40Originator Headersbest reply address
- Reply-To Resent-Reply-To
- a mailbox where responses are to be sent, often
used by list mail - From "Frits A.M. Storms" ltSTO_at_MH.NLgt
- Subject Re Can Satellite Node Crash-Dump into
Page File on Local Disk? - In-reply-to Mike's message of 20 May 1995
201728 GMT - Sender INFO-VAX Discussion ltINFO-VAX_at_UGA.BITNETgt
- To Multiple recipients of INFO-VAX
ltINFO-VAX_at_UGA.BITNETgt - Reply-to INFO-VAX_at_SRI.COM
Note how the Reply-to field is used
intelligently to direct mail to their preferred
address.
41Date Header is Required
- Orig-date or Resent-date field
- Just what it looks like
- Date Sat, 22 May 1993 054655 0000 (GMT)
- The only optional parts of the date specification
are the day of the week and the seconds. - Timezone may be given in the usual ways EST,
EDT, etc, UT, GMT, even military (Z,A,B,M,N). - Timezone is preferred as a numeric offset from GMT
42Recipient Headers
- At least one from this list must be present.
- To Resent-To
- cc Resent-cc
- bcc Resent-bcc
- Some systems show the bcc list only to the
author others show the bcc list to everyone on
the bcc list
Class quiz What do we mean by systems here?
Is it the MTA or the MUA that hides the bcc list?
A It could be either the MUA or the MTA on the
sending system.
43The Crucial Received Header
- Received from CGNET.COM by Arizona.EDU (PMDF
V4.3-9 2381) - id lt01HGUMM9OTUO9AR7DY_at_Arizona.EDUgt Thu, 08 Sep
1994 003913 -0700 (MST) - Received from faop.cgnet.com by CGNET.COM (PMDF
V4.3-9 7702) - id lt01HGUMN7N4S000370I_at_CGNET.COMgt Thu, 08 Sep
1994 004008 -0700 (PDT) - Received from msmail.fao.org (191.0.1.130)
- by FAOVMS.CGNET.COM (PMDF V4.3-8 3703)
- id lt01HGV4ZD1XTC8WW39N_at_FAOVMS.CGNET.COMgt Thu,
08 Sep 1994 092510 0200 - Received by msmail.fao.org with Microsoft Mail
id lt2E79C6AC_at_msmail.fao.orggt - Thu, 08 Sep 94 092412 02
44Received Lines are Key to Whats Going On
- The postmasters primary debugging tool
- Tells you which systems have touched (or possibly
mangled) the mail - Each MTA that relays a message attaches its own
Received header line - This is so important that MTAs are required by
RFC to add a Received line when they handle mail,
and they are prohibited by RFC from touching the
Received lines put on by other mailers.
45Received HeadersShow You the Path
Received from host 2 by host 3 Received by
host 2 from host 1 Received by host 1 from host
0 Received by host 0
3
2
1
2
Sender
0
1
46Hop by Hop You Can Follow Each Email Message
- Received from CGNET.COM by Arizona.EDU (PMDF
V4.3-9 2381) - id lt01HGUMM9OTUO9AR7DY_at_Arizona.EDUgt Thu, 08 Sep
1994 003913 -0700 (MST) - Received from faop.cgnet.com by CGNET.COM (PMDF
V4.3-9 7702) - id lt01HGUMN7N4S000370I_at_CGNET.COMgt Thu, 08 Sep
1994 004008 -0700 (PDT) - Received from msmail.fao.org (191.0.1.130)
- by FAOVMS.CGNET.COM (PMDF V4.3-8 3703)
- id lt01HGV4ZD1XTC8WW39N_at_FAOVMS.CGNET.COMgt Thu,
08 Sep 1994 092510 0200 - Received by msmail.fao.org with Microsoft Mail
id lt2E79C6AC_at_msmail.fao.orggt - Thu, 08 Sep 94 092412 02
host 2
???
host 1
host 0
??? Notice the difference in timezones!
47Received Line Information
Received from CGNET.COM by Arizona.EDU (PMDF
V4.3-9 2381) id lt01HGUMM9OTUO9AR7DY_at_Arizona.EDUgt
Thu, 08 Sep 1994 003913 -0700 (MST)
- Many optional fields
- from sending host
- by receiving host
- via physical path (predefined values)
- with link/mail protocol (predefined values)
- id reciever message id
- for initial form
- And one required field
- date-time timestamp when message received
48Received LineIP Address Authentication
- Some mailers check to see that the domain name in
the SMTP HELO command matches the IP address
making the SMTP connection, and put this verified
information in the Received line - RFC1123, Requirements for Internet Hosts,
requires that the receiver MUST NOT refuse to
accept a message, even if the senders HELO
command fails verification.
49The Crucial Message-ID Field
- An optional but universally implemented header
field - This is a unique identification in the context of
the handling mailer - There is no defined format for message ids,
except that they be unique identifiers - Invaluable for determining the source of mailing
loops - Examples
- lt01GSJUORQXTW8Y4WV2_at_mr.gov.bc.cagt
- lt9409011457.aa13678_at_clb_sj.clbooks.COMgt
- lt2D3D6235_at_courier.sscnet.ucla.edugt
- lt9311087554.AA755405259_at_ccmail.orst.edugt
- lt01GUH93WL9WI9377KN_at_Arizona.edugt
- lt01HH17GNOB1U8WVYX1_at_CCIT.ARIZONA.EDUgt
50Received Headers often contain the Message-ID
- An optional, but widely implemented, component of
the Received line - The same information as the orginating mailers
Message-ID field, provided by all the
intermediate mailers that handle the message - Lets you figure out if a repeated message is
being regenerated by the sender, or if the same
message is being resent by the sender. - Often lets you figure out which mailer is
mailbombing you
51Mail Messages Can Get Repeated Several Ways
The sender can be printing up copies of the
message
Or someone along the way can be making the copies
Different Message-IDs
Same Message-ID
52Header Usage byMailing Lists
- RFC822 suggests common sense
- The Sender field should be used instead of the
From field to report errors and problems - The Sender field should NEVER be used
automatically, in a recipients s reply message - Replies should go to the Reply-To field instead
of the From field - New (nonstandard) headers for mailing lists
- Errors-to is an explicit routing for all errors,
bounce messages, etc - Error-Reply is the same thing, it was just made
up by somebody else
53HeadersKey Concepts
- The absolute best and generally only way to debug
email problems is with headers - You must learn how to walk through headers
carefully so that you understand exactly what
happened at each step in the way - If someone suggests throwing away headers, beat
them with a hard mallet until they change their
mind - Extensions to the standard set of headers are
common
54MIMEMultipurpose Internet Mail Extensions
DECUS Fall 1996 Barcelona
55MIMEWhat is it?
- MIME stands for Multipurpose Internet Mail
Extensions - MIME defines extensions to SMTP to support binary
attachments of arbitrary format - The designers of MIME have learned a lot from
the old SMTP protocol and its mailers - MIME is here to stay, and it WORKS
- MIME requires more capable user agents to
interpret messages - These are widely available now, but they are not
ubiquitous
56MIME Does Two Main Things
- MIME encodes binary data so that it can be passed
over the Internet - Remember that the Internet is a 7-bit ASCII
world. - Even the 8-bit extensions dont work, because
there are issues of line length and file
formatting - MIME labels encoded data so that the content
can be properly understood at the other end - For example, this is a Microsoft Word document.
57How MIME Works
- Uses a new binary encoding scheme called BASE64
- New SMTP headers describe the attached document
- User agents read the headers to figure out how to
interpret the message
58MIME adds new headers
- From Nathaniel Borenstein
ltnsb_at_bellcore.comgt - To Ned Freed ltned_at_innosoft.comgt
- Subject Sample message
- MIME-Version 1.0
- Content-type multipart/mixed
boundary"simple boundary" - This is the preamble. It is to be ignored,
though it - is a handy place for mail composers to
include an - explanatory note to non-MIME conformant
readers. - --simple boundary
- This is implicitly typed plain ASCII text.
- It does NOT end with a linebreak.
- --simple boundary
- Content-type text/plain charsetus-ascii
- This is explicitly typed plain ASCII text.
- It DOES end with a linebreak.
59New MIME headers
Optional fields Content-type Content-transfer_enc
oding Content-ID Content-description Content-dispo
sition
- Required fields
- MIME-Version
60A sample message with binary attachment
From trumbo_at_Opus1.COM (Jan Trumbo) Subject
small message with Word attachment To
trumbo_at_Opus1.COM MIME-version 1.0 Content-type
MULTIPART/MIXED BOUNDARY"Boundary_ID_nf99lkyavA
uSoClF/HeK0Q" --Boundary_ID_nf99lkyavAuSoClF/He
K0Q Content-type text/plain charsetus-ascii J
oel, attached is a Word document. -
Jan --Boundary_ID_nf99lkyavAuSoClF/HeK0Q Date
Thu, 19 Sep 1996 164952 -0700 Content-type
application/mac-binhex40 nametiny_text_Word_doc.
doc Content-disposition attachment
filenametiny_text_Word_doc.doc ltWord document
and more stuff below heregt
This identical boundary marker separates the
parts of the mail message
61The same boundary marker separates each section
Joel, attached is a Word document. -
Jan --Boundary_ID_nf99lkyavAuSoClF/HeK0Q Date
Thu, 19 Sep 1996 164952 -0700 Content-type
application/mac-binhex40 nametiny_text_Word_doc.
doc Content-disposition attachment
filenametiny_text_Word_doc.doc (This file must
be converted with BinHex 4.0) R4TERNJG'9iG"AEh
N)'4B"A41690A4!!!!!!)!!!!!8b!2rih!-!!!! ltlot
s of binhex deletedgt --Boundary_ID_nf99lkyavAuSo
ClF/HeK0Q Content-type text/plain
charsetus-ascii Jan Trumbo, 1404 East Lind
Road, Tucson, AZ, 85719 Phone 1 520 324 0494
(voice) 1 520 324 0495 (FAX) trumbo_at_Opus1.COM
http//www.opus1.com/trumbo Opus One
X.500 cnTrumbo,oOpus
One,stArizona,cUS --Boundary_ID_nf99lkyavAuSoC
lF/HeK0Q--
The last boundary is marked by --on the end
62The Content-Type Header
- Content-Type Sub-Types Describes what format
this part of the message is in -
- The default type is simple ASCII text
text image message audio application video
multipart
MIME-version 1.0 Content-type text/plain
charsetus-ascii
63A Minimal MIME Message
- Date Fri, 20 Sep 1996 121349 -0700 (MST)
- From Jan Trumbo at large ltTRUMBO_at_Opus1.COMgt
- Subject just a text message
- To trumbo_at_Opus1.COM
- Message-id lt01I9P9DZLL6Y9ED99T_at_Opus1.COMgt
- MIME-version 1.0
- Content-type TEXT/PLAIN CHARSETUS-ASCII
- this is just a just an email note.
- Jan
A MIME-compliant mailer will generate a pair of
MIME headers
64Content-Type Application
- Subtypes
- Postscript
- octet-stream - unidentified binary data
- Many others will be added
Content-type application/mac-binhex40
nametiny_text_Word_doc.doc Content-disposition
attachment filenametiny_text_Word_doc.doc
These headers allow the Mail User Agent to
intelligently extract and name the attached
document
65Content-type Multipart
- Defines the semantics of a mail message with
several parts - Requires a boundary parameter
- Subtypes
- Multipart/mixed
- Multipart/alternative
- Multipart/digest
- Multipart/parallel
Content-type MULTIPART/MIXED BOUNDARY"Boundary_
ID_nf99lkyavAuSoClF/HeK0Q" --Boundary_ID_nf99l
kyavAuSoClF/HeK0Q
66Multipart Messages Can Be Nested
- From Nathaniel Borenstein ltnsb_at_bellcore.comgt
- To Ned Freed ltned_at_innosoft.comgt
- Subject Sample message
- MIME-Version 1.0
- Content-type multipart/mixed boundary"boundary
1" - --boundary 1
- This is the first part of a multipart message
- Content-type multipart/mixed boundaryboundary
2 - --boundary 2
- This is a nested part with its own boundary
parameter. - There could be anything in here.
- --boundary 2--
- --boundary 1
- Here is another message part
- --boundary 1--
67Encoding Schemes are Defined
- Content-Transfer-Encoding header tells how to
decode - Base64 encoding algorithm is used to encode
binary data in 7 bit ASCII data - Quoted-printable is for text-only messages
- A few others
- 7bit NO encoding case-insensitive
- 8bit NO encoding
- binary NO encoding
- x-token
68A Common Sight
- From Jan Trumbo
- To Joel Snyder
- MIME-version 1.0
- Content-type TEXT/QUOTED-PRINTABLE
CHARSETUS-ASCII - Now's the time
- for all folk to come
- to the aid of their country.
This is what you get when a word-processing
document with soft line breaks is put into
quoted-printable encoding
69MIME Handles Other Character Sets
- Other character sets must be encoded into ASCII
- Uses ISO character set encodings
- MUA will display in native character set if it
can - From Nathaniel Borenstein ltnsb_at_thumper.bellcore.c
omgt - (?iso-8859-8?b?7eXsSDv4SDp7Oj08A?)
- To Greg Vaudreuil ltgvaudre_at_NRI.Reston.VA.USgt,
Ned Freed ltned_at_innosoft.comgt, Keith Moore
ltmoore_at_cs.utk.edugt - Subject Test of new header generator
- MIME-Version 1.0
- Content-type text/plain charsetISO-8859-1
70MIME and Non-capable Mailers?
- MIME messages are 7-bit ASCII, so an unknowing
mailer wont munge the data - MIME messages have new headers, but mailers must
already support unknown headers - MIME messages are fine with ignorant mailers
71MIME User Agents
- On VMS, Macs, PCs, UNIX, HP/3000, VM/370 and OS/2
- 14 Freeware User Agents
- 29 Commercial User Agents
- See part two of the MIME FAQ
72Best Way to Keep on Top of MIME is With the FAQ
- http//www.cis.ohio-state.edu/text/faq/usenet/mail
/mime-faq/top.html - ftp//ftp.uu.net/usenet/news.answers/mail/mime-faq
/ - ftp//rtfm.mit.edu/pub/usenet-by-group/news.answer
s/mail/mime-faq/
73MIME RFCs
- 1521 "MIME (Multipurpose Internet Mail
Extensions) Part One Mechanisms for Specifying
and Describing the Format of Internet Message
Bodies" - 1522 "MIME (Multipurpose Internet Mail
Extensions) Part Two Message Header Extensions
for Non-ASCII Text" - 1524 A User Agent Configuration Mechanism for
Multimedia Mail Format Information, 09/23/1993 - 1563 "The text/enriched MIME Content-type"
74... and more MIME RFCs ...
- 1437 "The Extension of MIME Content-Types to a
New Medium" - 1652 "SMTP Service Extension for 8bit
MIMEtransport" - 1651 "SMTP Service Extensions"
- 1556 "Handling of Bi-directional Texts in MIME"
- 1740 "MIME Encapsulation of Macintosh files -
MacMIME" - 1741 "MIME Content Type for BinHex Encoded
Files"
75Client / Server Email POP and IMAP
DECUS Fall 1996 Barcelona
76Client/Server EmailFollows 3 Main Models
- Offline (POP3 model)
- Client connects to server and pulls all email
down to client - Everything is stored on the client
- Online (Original IMAP model)
- Client connects to server for every transaction
- Everything is stored on the server
- Disconnected (Later IMAP model)
- Client and server share storage burden
- Server is always authoritative and client must
synchronize to server
77POP and IMAP only get the mail
- These are protocols for how to deal with a
mailbox server - To SEND mail, both POP and IMAP clients use SMTP
- POP and IMAP clients need configuration
- mailbox server
- SMTP server
- Failure to configure produces unreplyable mail
78POP - Post Office Protocol
- POP2 and POP3 standards are incompatible, but
almost everything is POP3 now - Allows MAC and PC users a nice GUI interface to
their mail, which they like - Mailboxes are on a central server, like your VMS
box - POP clients connect to the server and copy their
mail to their local hard drive - POP locks you in to reading mail on the client
- POP clients can send binary attachments
- POP servers can be either single-threaded
(MultiNet) or multi-threaded (PMDF, Indiana
University)
79POP is very simple
- telnet/port110 mail.opus1.com
- Trying... Connected to MAIL.OPUS1.COM.
- OK cello.Opus1.COM MultiNet POP3 Server Process
V4.0(1) at Fri 20-Sep-96 321PM-MST - user trumbo
- OK User name (trumbo) ok. Password, please.
- pass thisismypasswordincleartext
- OK 3 messages in folder NEWMAIL (V4.0)
- list 2
- OK 2 7124
- stat
- OK 3 14749
- last
- OK 0
- quit
- OK POP3 MultiNet cello.Opus1.COM Server exiting
(3 NEWMAIL messages left) - Connection closed by Foreign Host
-
list gives individual message size in bytes
stat gives total message size in bytes
80POP has no security
- telnet/port110 mail.opus1.com
- Trying... Connected to MAIL.OPUS1.COM.
- OK cello.Opus1.COM MultiNet POP3 Server Process
V4.0(1) at Fri 20-Sep-96 321PM-MST - user trumbo
- OK User name (trumbo) ok. Password, please.
- pass thisismypasswordincleartext
- OK 3 messages in folder NEWMAIL (V4.0)
- list 2
- OK 2 7124
- stat
- OK 3 14749
- last
- OK 0
- quit
- OK POP3 MultiNet cello.Opus1.COM Server exiting
(3 NEWMAIL messages left) - Connection closed by Foreign Host
-
You can test passwords by connecting to the POP
port
81IMAP Has Everything POP Doesnt
- On-line, off-line, or disconnected mode operation
- Control of all folders everywhere
- Real authentication
- Multiple servers
82In IMAP the Client is King
IMAP mailbox server
Another IMAP mailbox server
Client can talk to multiple servers
Client decides where to store messages
Client can create new folders, purge and move
messages around
83IMAP Has Stronger Authentication
Password authentication
telnet/portimap piano.opus1.com Trying...
Connected to PIANO.OPUS1.COM, a DEC-VAX running
OPENVMS. OK Piano.Opus1.COM IMAP4 Server
PMDF5.1-2.2 at Tue, 24 Sep 1996 105922 MST a1
login trumbo xyzzy a1 OK LOGIN completed
Kerberos authentication
Example S OK KerberosV4 IMAP4 Server
C A001 AUTHENTICATE KERBEROS_V4
S AmFYig C
BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG25a4DT
nZImJjnTNHJUtxAAo0KPKfHEcAFs9
a3CL5Oebe/ydHJUwYFd
WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh
S or//EoAADZI C
DiAF5A4gAoOIALuBkAAmw S A001
OK Kerberos V4 authentication successful
84The INBOX
All servers support the default INBOX mailbox name
Each session has a unique identifier
a2 select inbox 2 EXISTS OK UIDVALIDITY
843562778 UID validity status FLAGS (\Answered
\Flagged \Deleted \Seen) OK PERMANENTFLAGS
(\Answered \Flagged \Deleted \Seen) Permanent
flags 2 RECENT a2 OK READ-WRITE SELECT
completed
The server tells the client what flags are
supported and what flags the user can change
The server indicates user privileges
85Use EXAMINE for Debugging
a3 examine inbox 5 EXISTS OK UIDVALIDITY
843564542 UID validity status FLAGS (\Answered
\Flagged \Deleted \Seen) OK PERMANENTFLAGS
(\Answered \Flagged \Deleted \Seen) Permanent
flags 2 RECENT a3 OK READ-ONLY EXAMINE
completed
This way you wont change any flag settings
Each client command has a unique tag generated by
the client (or by you)
86Header Details Can be Seen
Client tells the server how much of each message
to send
a4 fetch 45 (flags rfc822.header.lines (from
subject date)) 4 FETCH (FLAGS (\Recent)
RFC822.HEADER 133 Date Tue, 24 Sep 1996
103747 -0700 From clarify_at_Cisco.COM (Clarify
userid) Subject Change Request CR-002415
Dispatch Alert ) 5 FETCH (FLAGS (\Recent)
RFC822.HEADER 149 Date Tue, 24 Sep 1996
111208 -0700 (PDT) From Aaron Leonard
ltAARON_at_TGV.COMgt Subject Re IO_DASSIGN should
blow away the channel E52073 ) a4 OK FETCH
completed
87See What Folders Are Available
a5 list "" LIST (\Noinferiors) NIL INBOX
LIST (\NoInferiors) NIL ACES LIST
(\NoInferiors) NIL AIRAUTO LIST (\NoInferiors)
NIL BDAY LIST (\NoInferiors) NIL BITNET LIST
(\NoInferiors) NIL CITY LIST (\NoInferiors) NIL
CLASSICS (etc)
88Rummage around in one...
a6 select JTSA 132 EXISTS OK UIDVALIDITY
843564910 UID validity status FLAGS (\Answered
\Flagged \Deleted \Seen) OK PERMANENTFLAGS
(\Answered \Flagged \Deleted \Seen) Permanent
flags 0 RECENT a6 OK READ-WRITE SELECT
completed a6 fetch 132 (flags rfc822.header.lines
(from subject date)) 132 FETCH (FLAGS (\Seen)
RFC822.HEADER 91 Date Tue, 24 Sep 1996
135955 -0400 (EDT) From system_at_SEM.JTSA.EDU Sub
ject Status ) a6 OK FETCH completed
89And How To Get Out ...
telnet/portimap mail.opus1.com Trying...
Connected to MAIL.OPUS1.COM. OK
cello.Opus1.COM IMAP4 Server PMDF5.1-2.2 at Wed,
25 Sep 1996 175240 MST login trumbo xyzzy login
BAD Command unrecognized/login please TRUMBO a1
login trumbo xyzzy a1 OK LOGIN completed a2
quit a2 BAD Command unrecognized QUIT a2 exit a2
BAD Command unrecognized EXIT a2 close a2 BAD
Command unrecognized CLOSE a2 logout BYE
Cello.Opus1.COM 192.245.12.7 IMAP4 server
terminating connection a2 OK LOGOUT
completed Connection closed by Foreign Host
90IMAP Is Everything Needed
- ... to completely control mail management from
the client side - Especially suited to the roaming power user
91Configuring IMAP Service
- On VMS, only PMDF supports IMAP
- Create VMS accounts for IMAP users
- Configure IMAP clients (like PINE) with your
server name - Its a good idea to create CNAMEs like
IMAP.Opus1.COM and POP.Opus1.COM - Enable the service in your TCP/IP stack
- Read the manual before you do this
92IMAP Goes Beyond POP
- Interactive Mail Access Protocol
- Current version is V4
- RFC 1730 - IMAP V4
- RFC 1731 - IMAP Authorization
- RFC 1732 - IMAP compatibility
- RFC 1733 - IMAP model
- IMAP is implemented in products such as PINE
- IMAP can support on-line, off-line, or
disconnected mode operation
93(No Transcript)
94(No Transcript)
95(No Transcript)
96PT
M
CC
X
P
V 2
Sequence number
T
imestamp
Synchronization source (SSRC) identifier
Contributing source (CSRC) identifiers
Extension header
R
TP payload
97(No Transcript)
98Conventional telephone
network
H.323
H.323
gatekeeper
gateway
H.323
H.323
terminal
terminal
99(No Transcript)