Anda di halaman 1dari 15

Network Protocols and Architecture

( Application layer and Services )

Lecture 6 Principles of Application Layer Protocols E-Mail

Lecturer : Abdul Rahman Vakili

E-mail

Is short for electronic mail. E-mail is a text-based mail sent via the computer from one person to another.

E-mail is an ideal method for sending documents already on your computer using attachments.

More about Email


- It is a more up to date method of transmitting data, text files, digital photos and ... from one computer to another over the Internet. - This phenomenon did not become popular until 1990 and now it is a major business and personal communications. - Email users create and send messages from individual computers using Mail-User Agents (MUAs). - If the user were to send the message to more than one recipient, it is called broadcasting. - An E-mail account may looks like bellow: user@yahoogroups.com user@computername user@cs.tu-berlin.de user@afghanistan.af

Office Mail server

Internal and External Mail Server

Two Important Mail Protocols

The ability to provide E-mail services to clients includes two critical functions: SMTP: Simple Mail transfer Protocol for sending mail.

POP3 and IMAP: Post Office Protocol v3 and Internet Message Access Protocol which are used for retrieving mail.

Two important protocols

SMTP: Sending Mail


SMTP service is the side of e-mail that allows clients to send e-mail messages to any valid e-mail address. The SMTP server performs two basic but important functions:

1: Verifies that anyone attempting to send outgoing e-mail, through the SMTP server has the right to do so (Authentication). 2: It sends the outgoing mail and if not delivered, sends the message back to the sender.

SMTP Protocol

How does SMTP work?


We can connect to the SMTP server by using telnet and send a mail.
root@myhost:/> telnet mail.somedomain.com 25
Trying 10.10.10.10... Connected to mail.somedomain.com. Escape character is '^]'. 220 mail.somedomain.com ESMTP Exim 4.04 Wed, 13 Nov 2002 16:27:42 -0700

EHLO myhost.mydomain.com

250 mail.somedomain.com Hello myhost.mydomain.com [10.10.10.20]

MAIL FROM:<Jim@mydomain.com>
250 OK 250 OK

RCPT TO:<Joe@somedomain.com> Subject:Test Message

DATA

354 Enter message, ending with "." on a line by itself

<Enter> <Enter> QUIT

This is a test message. . 250 OK: queued as 18C6vd0005Ey-00 221 mailhub.somedomain.com closing connection Connection closed by foreign host

root@myhost:/>

SMTP reply codes


HELO

250 500 501 504 521

Requested mail action okay, completed Syntax error, command unrecognised Syntax error in parameters or arguments Command parameter not implemented <domain> does not accept mail [rfc1846]

RCPT

250 251 550

Requested mail action okay, completed User not local; will forward to <forward-path> Requested action not taken: mailbox unavailable

EHLO

250 550 500 501

Requested mail action okay, completed Not implemented Syntax error, command unrecognised Syntax error in parameters or arguments

DATA

354 451 554

Start mail input; end with <CRLF>.<CRLF> Requested action aborted: local error in processing Transaction failed

MAIL

QUIT 250 451 452 500 Requested mail action okay, completed Requested action aborted: local error in processing Requested action not taken: insufficient system storage Syntax error, command unrecognised

221 500

<domain>Service closing transmission channel Syntax error, command unrecognised

POP3 and IMAP

POP3: Is useful when e-mail is checked from only one computer. POP3 works by reviewing the inbox on the mail server, and downloading the new messages to your computer so your mail is stored on your PC. IMAP is the better choice when you would like to check your mails from multiple computers at work and home. IMAP downloads the headers of the new messages on the server, then retrieves the message you want to read when you click on it. When using IMAP, the mail is stored on the mail server. Unless you copy a message to a "Local Folder" the messages are never copied to your PC. Scenario of Use: POP3: You only check e-mail from one computer. You want to remove your e-mail from the mail server. IMAP: You check e-mail from multiple locations. You use Webmail.

POP3 / IMAP Protocols

Mail Process

MUA: Mail User Agent


Program used for reading and writing mail. For example: Pine , Netscape, Eudora Mailbox access methods used by MUAs: POP , IMAP

MTA: Mail Transport Agent


Program used for transporting mail from one host to another like: Sendmail, Exchange, qmail, Exim, Postfix Protocol between MTAs: SMTP

MDA: Mail Delivery Agent


MDA delivers the mail to the users mailbox

MUA MTA MDA communication

Email Client

We can use Email clients to download our Mails into our computer. Example: Microsoft Outlook, (Office Outlook,Outlook Express) Linux K-Mail Thunderbird (Linux,Windows)

...

Anda mungkin juga menyukai