24
Mail Services

Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

Embed Size (px)

Citation preview

Page 1: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

Mail Services

Page 2: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

A Mail Server’s Function

A mail server has basically 4 Functions

1. Accept Mail (From other servers)2. Send Mail (To a remote server)3. Accept Mail (From one user to be

sent out to another server)4. Send mail (To end user)

Page 3: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

A sample Message

Incoming mail server

Outgoing mail server

User A User B

SMTPSMTP POP or

IMAP

Page 4: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

The Messaging process

When a message is sent to a mail server it uses SMTP (Simple Mail Transfer Protocol) to send the message.SMTP uses port 25 on the accepting mail server.When the message arrives at the destination server it is then downloaded by a mail client using either POP3 or IMAP protocols

Page 5: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

POP

Post Office Protocol When you read your mail, all of it is immediately downloaded to your computer and no longer maintained on the server.

Page 6: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

IMAP

Internet Message Access Protocolprotocol in which e-mail is received and held for you by your Internet server. Your e-mail client can view just the heading and the sender of the letter and then decide whether to download the mail

Page 7: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

Features of IMAP

You can also create and manipulate folders or mailboxes on the server, delete messages, or search for certain parts or an entire note. IMAP requires continual access to the server during the time that you are working with your mail.

Page 8: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

IMAP Vs POP

IMAP can be thought of as a remote file server. POP can be thought of as a "store-and-forward" service.

Page 9: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

Common Email Port Addresses

110 pop3

25 smtp

143 imap

Page 10: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

Relaying Messages

Relaying is the process of sending or forwarding the message.Most mail servers will restrict where the forward messages from this is to reduce spamming.This is accomplished by setting a number of rules stating who is authorized and who isn’t.

Page 11: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

What makes a user authorized?

Outgoing Mail Server

Authorized user

Unauthorized user

•IP address

•Login/password

•The sender’s domain

•The sender’s email address

•The reply to address matches the sender’s address

•The receiver's address/domain

BLOCKED

Page 12: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

Different Unix Mail Servers

SendmailQmailPOSTFIXSMAILEXIMMMDFZMAILER

Page 13: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

Other Mail Servers

Exchange - MicrosoftGroupWise - NovellLotus notes – IBM

Page 14: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

The SMTP Protocol

HELO hotmail.com [email protected] Greet the mail server. Used once per

session - at the beginning of the session.

Page 15: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

The SMTP Protocol

MAIL FROM: <from> Announce who the sender is. Used

once per mail, before specifying any recipients for each mail, or after a RSET.

Page 16: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

The SMTP Protocol

RCPT TO: <rcpt> Announce who the mail is to. Multiple

recipients are allowed, each must have its own RCPT TO: entered immediately after a MAIL FROM:

Page 17: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

The SMTP Protocol

DATA Starts mail entry mode. Everything

entered on the lines following DATA is treated as the body of the message and is sent to the recipients. The DATA terminates with a . (period) on a line by itself. A mail may be queued or sent immediately when the . is entered. It cannot however be reset at this stage.

Page 18: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

The SMTP Protocol

RSET Reset the state of the current transaction. The MAIL FROM: and RCPT TO: for the current transaction are cleared.

QUIT

Page 19: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

The SMTP Protocol

DATA

From: me@mymachine To: [email protected]: A test message

This is gonna be like a small info bulletin on how... ... .

Page 20: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

A sample SMTP Session

homer:~$ telnet mx06.hotmail.com 25

Trying 64.4.55.7...Connected to mx06.hotmail.com.Escape character is '^]'.220-HotMail (NO UCE) ESMTP server ready

at Thu, 14 Feb 2002 05:52:19 -0800220 ESMTP spoken here

Page 21: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

A sample SMTP Session

helo [email protected] Requested mail action okay, completed

mail from: [email protected] Requested mail action okay, completed

rcpt to: [email protected] Requested mail action okay, completed

data354 Start mail input; end with

<CRLF>.<CRLF>

Page 22: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

A sample SMTP Session con’t

From: [email protected]: [email protected]: Hello

This is a test.

250 Requested mail action okay, completed

quit

Page 23: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

The POP Protocol

telnet popserver.ca 110+OK QPOP (version 2.53) at popserver.com starting. <1106.1075384691@popserver>USER username+OK Password required for hacker.Pass password

Page 24: Mail Services. A Mail Server’s Function A mail server has basically 4 Functions 1.Accept Mail (From other servers) 2.Send Mail (To a remote server) 3.Accept

POP Protocol

LIST _shows messagesRETR – Downloads MessagesDELE – Deletes a Message