0% found this document useful (0 votes)
309 views32 pages

E-Mail Server

The document discusses email services and protocols. It provides information on: 1) How email evolved from proprietary systems to using DNS with MX records to direct domains to mail servers. MIME was developed to allow attachments. 2) Common protocols like SMTP, POP, and IMAP that are used by email systems to communicate and retrieve emails. Popular mail servers and clients are also mentioned. 3) The roles of DNS, MX records, and IP addresses in associating domains with email servers. Providers offer services like sending, receiving, and storing emails.

Uploaded by

Mehari Temesgen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
309 views32 pages

E-Mail Server

The document discusses email services and protocols. It provides information on: 1) How email evolved from proprietary systems to using DNS with MX records to direct domains to mail servers. MIME was developed to allow attachments. 2) Common protocols like SMTP, POP, and IMAP that are used by email systems to communicate and retrieve emails. Popular mail servers and clients are also mentioned. 3) The roles of DNS, MX records, and IP addresses in associating domains with email servers. Providers offer services like sending, receiving, and storing emails.

Uploaded by

Mehari Temesgen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 32

Email Services

=============
The E-mail Environment
E-mail evolved from a variety of proprietary systems
In the 1980s and 1990s, people often had e-mail
addresses on a number of systems
The standard for current e-mail services is to use DNS
with a special Mail Exchange record
The Mail Exchange record contains the IP address of the mail
server for a domain
To allow users to send images, video, audio, and other
binary files via e-mails, the Multipurpose Internet
Mail Extension (MIME) specification was developed

Email Services 2
The E-mail Environment…
Protocols used by Email systems to communicate
include:
For sending mail:
Simple Mail Transfer Protocol (SMTP)
For retrieving email from electronic mailboxes
Post Office Protocol (POP)
Internet Mail Access Protocol (IMAP)
Common e-mail packages (servers) include:
Sendmail, Postfix (Linux)
Microsoft Exchange (Windows)

Email Services 3
Role of DNS in E-mail Systems
A domain name, such as example.org, needs to
be associated with two IP addresses
One IP address can be for a Web site
Another IP address is for e-mail
To associate a domain name, or any other host
name, with the IP address of an e-mail server,
you need a Mail Exchange (MX) record

Email Services 4
E-Mail Providers
Every email provider supplies three fundamental
services:
Send email
Receive email
Store received email at least temporarily
Difference between email providers and their
cost depends on:
Versatility
Security
Extent of services

Email Services 5
E-Mail Services
E-Mail services have three distinct components:
Mail User Agent (MUA) – the mail client the user interacts
with
E.g. Kmail, Alphine, Elm (Windows, Linux)
Mail Transfer Agent (MTA) – handles the process of getting
mail from one site to another
E.g. Sendmail, Postfix (Linux)
Microsoft Exchange (Windows)
Mail Delivery Agent (MDA) – takes the message and gets it
to the appropriate user mailbox, when received at the site
E.g. Procmail, Microsoft Exchange

Email Services 6
E-mail Protocols
The core email protocols include:
SMTP (Simple Mail Transfer Protocol) – used by
MTAs to transfers e-mails from one server to
another
POP (Post Officer Protocol) – used by MDAs to
deliver mail to users
IMAP (Internet Message Access Protocol) – also
used by MDAs to deliver mail to users
MAPI (Messaging Application Programming
Interface) – used with MS Outlook in conjunction
with MS Exchange Server mail server
HTTP – for WebMail accounts

Email Services 7
SMTP – Simple Mail Transfer Protocol
Overview
Introduction to SMTP and Email
Message Breakdown
Sample Messages
Extensions (MIME)
MTA’s and Mailbox Protocols
1st – What is SMTP?
The de facto standard for e-mail
transmissions across the Internet
It is defined in RFC 821
It is a relatively simple, text-based protocol
Not entirely secure thus vulnerable to
SPAM
SMTP
Originated in 1982 (rfc0821, Jon Postel)
Goal: To transfer mail reliably and efficiently
SMTP
SMTP clients and
servers have two
main components
 User Agents –
Prepares the
message, encloses it
in an envelope.
(Eudora for example)
 Mail Transfer Agent
(MTA) – Transfers the
mail across the
internet
SMTP
SMTP also allows the use of Relays allowing
other MTAs to relay/transmit/communicate the
mail.
What is Mail?
Mail is a text file
Envelope –
 sender address
 receiver address
 other information
Message –
 Mail Header – defines
the sender, the
receiver, the subject
of the message, and
some other
information
 Mail Body – Contains
the actual information
in the message
How SMTP works
The Essentials
Keyword Arguments
HELO Sender’s Host Domain Name
MAIL FROM: Email Address of sender
RCPT TO: Email of Intended recipient
DATA Body of the message
QUIT

How about a Demo?


Status Codes
The Server responds with a 3 digit code
that may be followed by text info
 2## - Success
 3## - Command can be accepted with
more information
 4## - Command was rejected, but error
condition is temporary
 5## - Command rejected, Bad User!
Status Codes
211 System status, or system help reply .
214 Help message.
220 <domain> Service ready.
221 <domain> Service closing transmission channel.
250 Requested mail action okay, completed.
251 User not local; will forward to <forward-path>.
354 Start mail input; end with <CRLF>.<CRLF>.
421 <domain> Service not available, closing transmission channel.
[This may be a reply to any command if the service knows it
must shut down].
450 Requested mail action not taken: mailbox unavailable.
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage.
Status Codes
500 Syntax error, command unrecognized. [This may include errors
such as command line too long]
501 Syntax error in parameters or arguments.
502 Command not implemented.
503 Bad sequence of commands.
504 Command parameter not implemented.
550 Requested action not taken: mailbox unavailable.
551 User not local; please try <forward-path>.
552 Requested mail action aborted: exceeded storage allocation.
553 Requested action not taken: mailbox name not allowed.
[E.g., mailbox syntax incorrect]
554 Transaction failed.
Connection Establishment

TCP Connection
Establishment
Message Progress
Connection Termination

TCP Connection Termination


Problems with SMTP
No inherent security
 Authentication
 Encryption
Only uses NVT (Network Virtual Terminal)
7-bit ASCII format
E-mails can be forged
E-mails can be forged…..
HELO mail.rose.edu
MAIL FROM: [email protected]
RCPT TO: [email protected]
DATA
From: Dr. Art Zenner
To: Professor Richards
Subject: CIT 2243

Professor Richards,
By department decree all students in your “Introduction to
Unix” class are hereby to be granted automatic A’s.
Thank you,
Dr. Art Zenner
.
QUIT
Extensions to SMTP
MIME – Multipurpose Internet Mail Extensions
 Transforms non-ASCII data to NVT (Network Virtual Terminal)
ASCII data
 Text
 Application
 Image
 Audio
 Video
MIME and Base64 Encoding
If the internet is the information
highway, then the path for email is a
narrow tunnel
 Only very small vehicles can pass trough
Then how do you send a big truck
through a small ravine?
 You have to break it down to smaller
pieces and transport the pieces through
the ravine, and reassemble the truck
MIME and Base64 Encoding
The same happens when you send a file
attachment via email.
This is known as encoding
 the binary data (256 bits) is transformed to
ASCII text (128 bits
 allowing it to fit through the tunnel
On the recipient's end, the data is
decoded and the original file is rebuilt.
Mail Transfer Agents (MTA)
MTAs do the actual mail transfers
MTAs are not meant to be directly
accessed by users.
The MTA delivers email to the user’s
mailbox
Other MTA’s are:
 Postfix, Qmail, MS Exchange, CC:Mail
 Lotus Notes, ….etc.
Problems with simple SMTP
The first one relates to message length. Some older
implementations cannot handle messages exceeding
64KB.
Another problem relates to timeouts. If the Client and
server have different timeouts, one of them may give
up while the other is still busy, unexpectedly
terminating the connection.
Infinite mail storms can be triggered. For example, If
host 1 holds mailing list A and host 2 holds mailing list B
and each list contains an entry for the other one, then a
message sent to either list could generate a never
ending amount of email traffic unless somebody checks
for it.
ESMTP (RFC 2821)
To get around the problems with simple
SMTP, extended SMTP has been defined in
RFC 2821.
Clients wanting to use it should send an EHLO
message instead of HELO initially. If this is
rejected, then the server is a regular SMTP
server, and the client should proceed in the
usual way. If the EHLO is accepted, then new
commands and parameters are allowed.
POP vs. IMAP
POP3:
All Messages
Internet
Whole
m essage

IMAP:
Dr.Amer
Friends
…. rs
heade
Internet
Post Office Protocol v3

Simple
Allows the user to obtain a list of their
Emails
Users can retrieve their emails
Users can either delete or keep the email
on their system
Minimizes server resources
Internet Mail Access Protocol v4

Has more features than POP3


User can check the email header before
downloading
Emails can be accessed from any location
Can search the email for a specific string of
characters before downloading
User can download parts of an email
User can create, delete, or rename mailboxes
on a server

You might also like