Post on 26-Dec-2015
School of Electronics and Telecommunications 1/25
Presented by: Pham Van ChiBui Thi The Ha
Electronic Mail: SMTP
School of Electronics and Telecommunications 2/25
OBJECTIVES:OBJECTIVES:
To explain the architecture of electronic mail using four scenarios.
To explain the user agent (UA)
Transfer Protocol (SMTP) as the formal protocol that handles MTA.
To explain e-mail transfer phases.
School of Electronics and Telecommunications 3/25
Explain the architecture of electronic mail
To explain the architecture of email, we give four scenariosTo explain the architecture of email, we give four scenarios
Scenarior 1
Scenarior 2
Scenarior 3
Scenarior 4
School of Electronics and Telecommunications 4/25
Figure 1 First scenario
1
2
School of Electronics and Telecommunications 5/25
When the sender and the receiver of an e-mail are on the same mail server,
we need only two user agents.
Note:Note:
School of Electronics and Telecommunications 6/25
Figure 2 Second scenario
1
2 3 4
5
School of Electronics and Telecommunications 7/25
When the sender and the receiver of an e-mail are on different mail servers,
we need two UAs and a pair of MTAs (client and server).
Note:Note:
School of Electronics and Telecommunications 8/25
Figure 3 Third scenario
1
2
3
45 6
7
School of Electronics and Telecommunications 9/25
When the sender is connected to the mail server via a LAN or a WAN, we
need two UAs and two pairs of MTAs (client and server).
Note:Note:
School of Electronics and Telecommunications 10/25
Figure 4 Fourth scenario
1
2
3
4 5 6
8
9
School of Electronics and Telecommunications 11/25
When both sender and receiver are connected to the mail server via a LAN or a WAN, we need two UAs, two pairs of MTAs
(client and server), and a pair of MAAs (client and server). This is the most
common situation today.
Note:Note:
School of Electronics and Telecommunications 12/25
Figure 5 Push versus pull
School of Electronics and Telecommunications 13/25
Explain the user agent (UA),
- UA là thành phần đầu tiên của một hệ thống thư điện tử
- Cung cấp dịch vụ tới người sử dụng
- Giúp quá trình gửi nhận thư dễ dàng hơn
School of Electronics and Telecommunications 14/25
Figure 6 User agent
Some examples of command-driven user agents are mail, pine, and elm
Some examples of GUI-based user agents are Eudora, Outlook, and Netscape
Note:Note:
School of Electronics and Telecommunications 15/25
Transfer Protocol (SMTP)
- Để gửi mail, hệ thống phải có client MTA
- Để nhận mail. Hệ thống phải có server MTA
- Giao thức định nghĩa MTA client và server trên Internet
được gọi là SMTP (Simple Mail Transfer Protocol)
- Scenario 4 là trường hợp thường gặp nhất
- Hình 7 thể hiện phạm vi sử dụng giao thức SMTP trong
scenario này
School of Electronics and Telecommunications 16/25
Figure 7 SMTP range
School of Electronics and Telecommunications 17/25
Figure 8 Commands and responses
• command/response interaction– commands: ASCII text– response: status code and phrase
• messages must be in 7-bit ASCII• Uses CRLF.CRLF to determine end of message
School of Electronics and Telecommunications 18/25
School of Electronics and Telecommunications 19/25
School of Electronics and Telecommunications 20/25
Figure 9 Message transfer
School of Electronics and Telecommunications 21/25
Figure 10 Connection termination
1 QUIT
2221 service closed
School of Electronics and Telecommunications 22/25
Send A Fake Mail uses QK SMTP server
-Sử dụng TELNET để login cổng 25 (the well-known port
for SMTP).
- Sử dụng câu lệnh để gửi email.
- Giả sử billg@microsoft.com gửi 1 email cho
chipvc@gmail.com
ExampleExample
School of Electronics and Telecommunications 23/2523
ExampleExample Continued
================== Connection Establishment ================ 220 Welcome to QK SMTP Server 3
helo hacker (Type helo & any name followed by space)250 Hello hacker (Server Welcomes You)
===================== Envelope =================== MAIL FROM: billg@microsoft.com 250 billg@microsoft.com Address Okay (Server gives a positive response)RCPT TO: chipvc@gmail.com
250 chipvc@gmail.com Address Okay =================== Header and Body ==================DATA (type this command to start input data) 354 Please start mail inputFrom:Gates <billg@microsoft.com>To:chipvc@gmail.comDate:Sat Jan 5,2008 9:45 PMSubject:Test to send fake email
School of Electronics and Telecommunications 24/25
Figure 11 SMTP, Pop3 and IMAP4
School of Electronics and Telecommunications 25/25
Any