Beruflich Dokumente
Kultur Dokumente
Grundlegende Dienste
Univ.-Prof. Dr.-Ing. habil. Gero Mühl
root
ee cs ... informatik
db ai … ... ...
ee
cs ... informatik physik
db ai … ... ...
3
.princeton.edu
1 4
Lokaler cicada.cs.princeton.edu
Princeton
cicada.cs.princeton.edu
Client Name Name
128.112.136.60 cs.princeton.edu, 128.112.136.10 Server
Server
8 5
6
.cs.princeton.edu
Caching des Ergebnisses im
lokalen Name Server CS
Name
Bereinigung des Caches entsprechend der 7 Server
Time-to-Live des Eintrags
Benutzer
2 cs.princeton.edu smith@cs.princeton.edu 1
Name Mail
Mail
Server program
Program
128.112.136.15
3 128.112.136.15 4
User User
Agent Agent
Postfix, Exim,
Sendmail, …
Client Server
220 otto.edu SMTP service ready
HELO client.otto.edu
250 OK
MAIL FROM: <onkel@otto.edu>
250 sender OK
RCPT TO: <emil@fritz.com>
250 recipient OK
DATA
354 send mail; end with "."-line
text text text text ......
.
250 message accepted
QUIT
221 otto.edu closing connection
Body
> Umschlag wird von den Transfer Agents benutzt und gebildet
> Header-Felder
> To: (primäre) Empfänger
> Cc: (sekundäre) Empfänger
> Bcc: (unsichtbare) Empfänger
> From: Briefschreiber
> Sender: Absender (falls unterschiedlich von From)
> Received: pro Zwischen-Transfer-Agent eine Zeile
> Return-Path: Rückweg für Antworten
> Content-Description
> Optionale, menschen-lesbare Beschreibung des Inhalts
> Content-Id
> Optionaler eindeutiger Bezeichner für den Inhalt
> Content-Transfer-Encoding
> Bezeichnet die Kodierung (Art der Verpackung) des Inhalts
> Content-Type
> Art des Inhalts (z.B. Text, Bild, Audio, etc.)
Hüte H=FCte
(Latin-1) (Quoted-Printable)
Hüte SPx0ZQ==
(Latin-1) (Base64)
Text M a n
Base64 T W F u
4 x 6 Bit
G. Mühl Webbasierte Anwendungen / Grundlegende Dienste 24
Base64 Tabelle
Wert Zeichen Wert Zeichen Wert Zeichen Wert Zeichen
0x00 (00) A 0x10 (16) Q 0x20 (32) g 0x30 (48) w
0x01 (01) B 0x11 (17) R 0x21 (33) h 0x31 (49) x
0x02 (02) C 0x12 (18) S 0x22 (34) i 0x32 (50) y
0x03 (03) D 0x13 (19) T 0x23 (35) j 0x33 (51) z
0x04 (04) E 0x14 (20) U 0x24 (36) k 0x34 (52) 0
0x05 (05) F 0x15 (21) V 0x25 (37) l 0x35 (53) 1
0x06 (06) G 0x16 (22) W 0x26 (38) m 0x36 (54) 2
0x07 (07) H 0x17 (23) X 0x27 (39) n 0x37 (55) 3
0x08 (08) I 0x18 (24) Y 0x28 (40) o 0x38 (56) 4
0x09 (09) J 0x19 (25) Z 0x29 (41) p 0x39 (57) 5
0x0A (10) K 0x1A (26) a 0x2A (42) q 0x3A (58) 6
0x0B (11) L 0x1B (27) b 0x2B (43) r 0x3B (59) 7
0x0C (12) M 0x1C (28) c 0x2C (44) s 0x3C (60) 8
0x0D (13) N 0x1D (29) d 0x2D (45) t 0x3D (61) 9
0x0E (14) O 0x1E (30) e 0x2E (46) u 0x3E (62) +
0x0F (15) P 0x1F (31) f 0x2F (47) v 0x3F (63) /
Some text appears here... Since no header fields were given the
text is assumed to be US-ASCII.
--unique-boundary-1
Content-type: text/plain; charset=US-ASCII
This could have been part of the previous part, but illustrates
explicit versus implicit typing of body parts.
--unique-boundary-1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
VGhpcyBpcyBVVEYtOCB0ZXh0IHdoaWNoIGlzIEJhc2U2NCBlbmNvZGVkIHRvIHByZXN
lcnZlIEdlcm1hbiBVbWxhdXRlOiBIw7x0ZSBhbmQgSMOkdXNlci4=
--unique-boundary-2
Content-Type: audio/basic
Content-Transfer-Encoding: base64
--unique-boundary-2
Content-Type: image/png
Content-Transfer-Encoding: base64
--unique-boundary-1
> Beispiel
MimeBodyPart txt = new MimeBodyPart();
txt.setContent("This is plain text.", "text/plain");
MimeBodyPart html = new MimeBodyPart();
html.setContent("<html><body>This is <b>HTML</b>.</body></html>",
"text/html");
MimeMultipart content = new MimeMultipart("alternative");
content.addBodyPart(txt); content.addBodyPart(html);
Message msg = ...
msg.setContent(content);
Client Server
Daten Steuerung Steuerung Daten
TCP
Port Port
50022 22
private_host public_host
Port Port
22 50023
private_host public_host