Mail Server
Mail Server
Email Server
• What is email?
• The term “email” stands for “electronic mail”. The electronic mail is
introduced first in the 1960s, however it became available in the current
structure in the 1970s. Let us take a look at how email actually works.
• One important point to make about the SMTP protocol is that it does not
require authentication. This allows anyone on the Internet to send email to
anyone else or even to large groups of people. It is this characteristic of
SMTP that makes junk email or spam possible. Imposing relay restrictions
limits random users on the Internet from sending email through your SMTP
server, to other servers on the internet. Servers that do not impose such
restrictions are called open relay servers.
Mail Access Protocols
• POP
• The default POP server under Red Hat Enterprise Linux
is Dovecot and is provided by the dovecot package.
When using By default,
on the email server
a POP server, email most POP email clients however this setting
after it has been
messages are are automatically usually can be
successfully
downloaded by email configured to delete changed.
transferred,
client applications. the message
POP works best for users who have one system on which to read
email. It also works well for users who
do not have a persistent connection to the Internet or the network
containing the mail server.
Unfortunately for those with slow network
connections, POP requires client programs upon
authentication to download the entire content of each message.
This can take a long time if any messages have large attachments.
IMAP
When using an IMAP mail server, email messages remain on the server
where users can
read or delete them. IMAP also allows client applications to create,
rename,
or delete mail directories on the server to organize and store email.
IMAP is particularly useful for users who access their
email using multiple machines.
The protocol is also convenient for users connecting to
the mail server via a slow connection,
because only the email header information is
downloaded for messages until opened, saving
bandwidth.
The user also has the ability to delete messages
without viewing or downloading them.
Types of Mail Servers
SMTP is part of the application layer of the TCP/IP protocol. Using a process
called “store and forward,” SMTP moves your email on and across networks.
It works closely with something called the Mail Transfer Agent (MTA) to send
your communication to the right computer and email inbox.
SMTP spells out and directs how your email moves from your computer’s
MTA to an MTA on another computer, and even several computers. Using
that “store and forward” feature mentioned before, the message can move
in steps from your computer to its destination. At each step, Simple Mail
Transfer Protocol is doing its job. Lucky for us, this all takes place behind the
scenes, and we don’t need to understand or operate SMTP.
How SMTP works?
SMTP provides a set of codes that simplify the communication of email messages
between email servers (the network computer that handles email coming to you
and going out). It’s a kind of shorthand that allows a server to break up different
parts of a message into categories the other server can understand. When you
send a message out, it’s turned into strings of text that are separated by the code
words (or numbers) that identify the purpose of each section.
SMTP provides those codes, and email server software is designed to understand
what they mean. As each message travels towards its destination, it sometimes
passes through a number of computers as well as their individual MTAs. As it
does, it’s briefly stored before it moves on to the next computer in the path.
Think of it as a letter going through different hands as it winds its way to the right
mailbox.
POP 3 Server
POP3, which is an abbreviation for Post Office Protocol 3, is the third version of a
widespread method of receiving email. Much like the physical version of a post
office clerk, POP3 receives and holds email for an individual until they pick it up.
And, much as the post office does not make copies of the mail it receives, in
previous versions of POP3, when an individual downloaded email from the server
into their email program, there were no more copies of the email on the server;
POP automatically deleted them.
POP3 makes it easy for anyone to check their email from any computer in the
world, provided they have configured their email program properly to work with
the protocol.
Working of
• Because POP3 is a basic method of storing and
retrieving email, it can work with virtually any
email program, as long as the email program
Disadvanta
push
ous
ta n tane ns don’t
You Ins ficatio OP
mes can’t sen noti ist for P can,
s ex s. You the
mor ages fro d m p
syste ver, set u to
e tha m
ges of
devi n one e m
ce. how ail syste check
em ically new
d r
perio erver fo s.
the s essage
m
POP3 Yo
uw
o t
be n’ t no
a
or uto nefi hav can as
ga m t o e t s ge
file into nizin atica f he em sa re
syst mes mo e. If
o s. fol g e lly P a on ic
yo rgan If yo ders mai PO ark ad” dev load
u r ize u
w an ls m “re one wn new all
n ec th a d an do a il ,
l
ma eed eive e em nt to th you ils to ey w new s.
n ,
an time ual to do you ails a th e e
em ice, p lik ssag
d l -c ly. w
ab on Th so ill e v w u me
d ho d
or- su is
int min is s rea
en g
siv un
e.
An email protocol is the method
that two computers use to
communicate with one another Between the two devices is the
and transfer information mail server. The email protocol
between them. One is the determines how the server
sender and one is the receiver. stores and deletes messages. It
IMAP is one of three commonly also has a direct impact on the
used email protocols. The other user’s email experience.
two are SMTP (Simple Mail
Transfer Protocol) and POP.
IMAP
This makes it possible to check
The server in an IMAP system your email from several
stores your emails, even after different devices without
they have been delivered. When missing a thing. IMAP allows
you open a message received you to access your email
through IMAP, your device messages from wherever you
doesn’t download or store that are. Much of the time, email is
email. Instead, you read it off accessed via the internet, and
the server. IMAP is the best method for
making that happen.
First of all, IMAP allows you to access,
organize, read, and sort your email
There are several advantages to using messages without having to download
IMAP instead of POP. them first. This creates a faster email
experience, as well as a more flexible
one.
Advantages
of IMAP
When checking email from your The server keeps a record of all of the
smartphone without wifi, you’ll use less messages that you have sent, allowing
data because you don’t have anything set you access to sent messages from
to auto-download. Choose when you anywhere. Because of this, you can use as
want to download attachments. many devices
POP works fine for those who generally only check their
email messages from a single device; those who travel or
need to access their email from various devices are much
better off using an IMAP-based email service.
The Process of Sending an Email
• Step #1
• After composing a message and hitting send, your email client – whether
it’s Outlook Express or Gmail – connects to your domain’s SMTP server.
This server can be named many things; a standard example would be
smtp.example.com.
• Step #2: Your email client communicates with the SMTP server, giving it
your email address, the recipient’s email address, the message body and
any attachments.
• Step #3: The SMTP server processes the recipient’s email address – especially its
domain. If the domain name is the same as the sender’s, the message is routed
directly over to the domain’s POP3 or IMAP server – no routing between servers is
needed. If the domain is different, though, the SMTP server will have to communicate
with the other domain’s server.
• Step #4: In order to find the recipient’s server, the sender’s SMTP server has to
communicate with the DNS, or Domain Name Server. The DNS takes the recipient’s
email domain name and translates it into an IP address. The sender’s SMTP server
cannot route an email properly with a domain name alone; an IP address is a unique
number that is assigned to every computer that is connected to the Internet. By
knowing this information, an outgoing mail server can perform its work more efficiently.
• Step #5: Now that the SMTP server has the recipient’s IP address, it can
connect to its SMTP server. This isn’t usually done directly, though;
instead, the message is routed along a series of unrelated SMTP servers
until it arrives at its destination.
• Step #6: The recipient’s SMTP server scans the incoming message. If it
recognizes the domain and the user name, it forwards the message along
to the domain’s POP3 or IMAP server. From there, it is placed in a
sendmail queue until the recipient’s email client allows it to be
downloaded. At that point, the message can be read by the recipient.
A Mail Delivery Agent (MDA)
is invoked by the MTA to file
incoming email in the proper
such as mail or Procmail.
user’s mailbox. In many cases,
the MDA is actually a Local