Slide 26
Slide 26
SMTP
and
FTP
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Email is used for sending a single message that
includes text, voice, video, or graphics to one or more
recipients.
Simple Mail Transfer Protocol (SMTP).
Sending Mail
User creates mail that looks very similar to postal mail.
Envelope: sender and receiver address
Message:
Header: Define the sender, receiver, subject of the message, ...
Body:contains the actual information to be read by the recipient.
Receiving mail
Email system periodically checks the mailboxes.
If a user has mail, it informs the user with a notice
If the user is ready to read the mail, a list is displayed in which
each line contains a summary of the information about a
particular message in the mailbox. Summary contains the
sender mail address, the subject, and time the mail was sent
or received.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 26.1 Format of an email
Category Description
Binary 6-bit blocks of data are encoded into 8-bit ASCII characters
Value Code Value Code Value Code Value Code Value Code Value Code
0 A 11 L 22 W 33 h 44 s 55 3
1 B 12 M 23 X 34 i 45 t 56 4
2 C 13 N 24 Y 35 j 46 u 57 5
3 D 14 O 25 Z 36 k 47 v 58 6
4 E 15 P 26 a 37 l 48 w 59 7
5 F 16 Q 27 b 38 m 49 x 60 8
6 G 17 R 28 c 39 n 50 y 61 9
7 H 18 S 29 d 40 o 51 z 62 +
8 I 19 T 30 e 41 p 52 0 63 /
9 J 20 U 31 f 42 q 53 1
10 K 21 V 32 g 43 r 54 2
Quoted-Printable
Base64 is a redundant encoding scheme; that is, 24
bits becomes four characters and eventually is sent
as 32 bits.
If the data consist mostly of ASCII characters with a
small non-ASCII portion, we can use quoted-printable
encoding.
If a character is:
ASCII, it is sent as it is.
Non-ASCII, sent as three characters. First character is
the equals sign (=). Next two characters are the hex of
the byte.
Control Connection
Created in same way as other application programs.
Connection remains open during the entire process.
Service type used by the IP is minimize delay,
because this is an interactive connection between a
user (human) and a server.
User types commands and expects to receive
responses without significant delay.
Data connection
Opened when data are ready to transfer. Closed
when it is not needed.
Service type used by IP is maximize throughput.
Commands
$ ftp challenger.atc.fhda.edu
Connected to challenger.atc.fhda.edu
220 Server ready
Name: forouzan
Password: xxxxxxx
ftp > ls /usr/user/report
200 OK
150 Opening ASCII mode
...........
...........
226 transfer complete
ftp > close
221 Goodbye
ftp > quit