KEMBAR78
Email Server Definitive Guide (2025) | PDF | Domain Name System | Security
0% found this document useful (0 votes)
37 views85 pages

Email Server Definitive Guide (2025)

The Email Server Definitive Guide [2025] provides a comprehensive overview of mail servers, detailing their functions, types, and security measures. It covers essential topics such as email protocols, the relationship between mail servers and DNS, and the processes involved in email delivery. The guide is structured into six chapters, each focusing on specific aspects of email server operation and administration, supported by practical examples and illustrations.

Uploaded by

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

Email Server Definitive Guide (2025)

The Email Server Definitive Guide [2025] provides a comprehensive overview of mail servers, detailing their functions, types, and security measures. It covers essential topics such as email protocols, the relationship between mail servers and DNS, and the processes involved in email delivery. The guide is structured into six chapters, each focusing on specific aspects of email server operation and administration, supported by practical examples and illustrations.

Uploaded by

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

Email Server Definitive Guide [2025]

RAHMAN MUNNA / MARCH 18, 2025 / MAIL SERVER

Email Server Definitive Guide [2025]: Featured Image

This is an in-depth guide on Email Servers.

You will get a complete idea about mail servers, how they work, their types,
functions, and various solutions with examples.

We described each topic with practical use cases, detailed diagrams and
illustrations.

In this guide, we will explore step-by-step:

• What is a mail server, and how does it work?


• What are the different types of email servers?
• What do advanced email servers do?
• What is an email protocol and Its usage?
• What is email server security? And more.

Understanding different types of mail servers, their functionalities, associated


technologies, and security measures is critical for email server administration.

Contents

We have organized the article into six chapters. Each focuses on specific aspects of
mail servers.

Ready? Let’s dive into this Email Server Definitive Guide !!

Chapter1:

Mail Server Basics


Now, it’s time
to get into the
details of
Email Servers.
We will start
with the basics
of the mail
server.

We explained
the necessary
concepts in
detail with
illustrations,
diagrams and
animations.

In this chapter,
I will explain
the basics of
the email
server, what it
is, and how it
works. The
email
protocols and
communicatio
ns, etc.

Please read
the topics step
by step.
Understandin
g these
foundational
concepts is
crucial to
understanding
the upcoming
advanced
concepts on
the mail
server.

Let’s dive right


in.

In this chapter, we are going to discuss the following:

• #1: What is a mail server?


• #2: Mail Server Core Components.
• #3: What is a mail client?
• #4: What is email protocol?
• #5: Mail server relation with DNS
• #6: How mail server deliver emails?

What is a mail server?

A mail server (often called an email server) is a specialized software application


typically installed on a dedicated computer (VPS or a physical server). Its primary
functions include sending, receiving, routing, filtering, and storing emails in
users’ mailboxes.

A mail server is the backbone of email communication and ensures messages


are properly delivered between senders and recipients.
Figure 1: Popular email server softwares for Windows and Linux platforms, including free, open-
source, and proprietary solutions.

Email sending and receiving both involve a mail server to process the email. Before
reaching the users, the mail server authenticates the user, accepts the emails,
validates the proper email format and applies security measures.

Figure 2: Animation of email processing by a mail server, including authentication, validation, and
security checks.
When a user sends an email, it is received by the sender’s mail server. Then, the
sender’s mail server delivers it to the recipient’s mail server (in case of a remote
address). The recipient’s email client (e.g., Outlook) retrieves it from their server.
This is the send/receive scenario, in short.

Figure 3: Gif animation of the email delivery process, from sender to recipient via mail servers.

The whole process may seem simple, but behind the scenes, multiple
servers may handle the transfer process, which could create a more
complex scenario.

Mail servers are often referred to as MTA (Mail Transfer Agent), MDA (Mail Delivery
Agent), or SMTP Server (Simple Mail Transfer Protocol). These terms are used to
identify the specific role of a mail server. An MTA focuses on relaying emails
between servers, while an SMTP server handles sending and routing outgoing
emails. We will discuss these terms in detail later.
Mail Server Core Components

A mail server system consists of multiple core components. They handle different
tasks or processes inside the mail server. The main core components include
delivery agents, email queues, and policies.

Figure 4: Core components of a mail server, including Delivery Agents, Mail Queue, and Policies.

Delivery Agents:

There are multiple delivery agents in the mail server. They handle different phases
of email delivery. Below is the list of common delivery agents:

• Mail submission agent (MSA) – Listens on port 587 or 465. email clients
connect to the MSA securely and deliver emails. Before receiving an email,
MSA has a policy to check and filter emails. Then, it passes the email to the
Mail queue for further processing. (MSA may or may not pass the emails to MTA
before Mailque; this will depend on the implementation of the mail server
software).
• Mail transfer agent (MTA) – Listens on port 25 and accepts emails from mail
clients with plain SMTP protocol. MTA also has its policies before receiving and
delivering emails to Mailqueue for further processing.
• Mail delivery agent (MDA) – receives mail from the queue for local or remote
delivery. Multiple mail delivery agents exist for local and remote delivery of
files and programs.

Mailque:

Mailqueu is the central location for email delivery; delivery agents pick up mail from
the queue. Multiple queues are inside the main queue; incoming mail is in the
Incoming Queue. If the mail is not delivered, it is placed in a deferred queue;
delivery agents pick mail up from the active queue, which is ready for delivery.

Policies:

Each sub-component has its policy before receiving, processing and delivering
emails. Policies include filtering and routing policies. Emails can be dropped or re-
routed on each phase based on condition and policy.

Other Agents:

These agents are not part of the mail server subsystem but rather part of the mail
server ecosystem.

Mail User Agents (MUA): Email clients are MUA or Mail User Agents. All mail clients
who can communicate with mail server servers are considered MUA, including
command-line programs and external software.

Mail Retrieval Agents (MRA): This unique application retrieves emails from remote
mail servers using standard protocols like POP3 or IMAP and delivers emails to
MDA for local or remote delivery. Common MRAs are fetchmail and getmail on
the Linux platform. Most Windows mail server software includes MRA functionality.
Newsletter
Get Special Free Tips, Tricks & Tutorials

Name

Email

Subscribe

What is a mail client?

A mail client is a piece of application that communicates with mail server using
POP3, IMAP and SMTP protocol to send and receive emails.

A mail client can be a simple command, API, or graphical software that can access,
manage, and send and receive emails from a mail server.

Mail clients like Outlook, Thunderbird, and Apple Mail offer rich user interfaces
for organizing emails, contacts, and folders. They allow users to send/receive
emails and provide features like email filtering, folder management, search
functionality, and integration with calendars and tasks.

Figure 5: Popular email client softwares for mobile, PC, and Mac, including free, open-source, and
proprietary software.

Mail client software can be web-based, mobile or desktop applications. Below is our
list of some popular email clients:

• CLI-based mail clients: Mutt, Alpine, Mailx


• Desktop Software: Microsoft Outlook, Mozilla Thunderbird, Apple Mail,
Mailbird.
• Web-based mail clients: Roundcube, Mailpile, RainLoop, Horde, SquirrelMail.
• Mobile Clients: Gmail, Outlook, BlueMail, Spark, Aqua Mail, ProtonMail,
MailDroid.

What is email protocol?

Email protocols are the communication technology the client and server use to
send or receive emails. These are a set of rules, some conversation between client
to server or server to server, to govern how email should be sent or received.
Figure 6: Gif Animation of email protocol conversation between an email client and mail server.

Email protocols handle the email data, including its structure, content, metadata,
and attachments.

There are multiple email protocols like, SMTP, ESMTP, POP3, IMAP, JMAP, EAS
(Exchange ActiveSync), MAPI, LMTP etc. most common are SMTP, POP3 and IMAP.
other protocols are proprietary or used in special cases.

In this article, we will focus on the three most common and widely used protocols.

What is SMTP Protocol?

SMTP stands for Simple Mail Transfer Protocol. It is the Internet standard
communication protocol for mail servers to send/receive email messages between
them. SMTP defines the rules for email data exchange and ensures messages’
delivery.

SMTP operates over TCP on port 25, although ports 587 or 465 are commonly used
for secure email submission.

Figure 7: Email client use SMTP only to send emails to server, Where mail servers use SMTP to send/
receive emails between them.

SMTP uses a client-server architecture, where the email client or server acts as the
sender, and the receiving mail server receives the message and delivers it to the
recipient’s inbox.

Email client’s uses SMTP only to send messages to the outgoing mail server.

What is POP3 Protocol?

POP3 stands for Post Office Protocol version 3. It is the standard internet protocol
used by the email clients to retrieve email masseges from the mail servers.

POP3 downloads emails on the local client, allows users to access their mails offline
without active internet connection. once the emails are downloaded, they are
typically deleted from the server, although we can change this behavior on the
configuration.

POP3 typically uses port 110 for non-encrypted communication and port 995 for
encrypted connections using SSL/TLS.
Figure 8: POP3 protocol workflow showing Users are downloading emails to their email clients using
POP3 protocol.

The process of how POP3 works involves several steps:

1. The email client connects to the mail server on port 110 (or port 995 for SSL/
TLS).
2. Once connected, the client authenticates itself using a username and
password.
3. The client requests the list of emails from the server and proceeds to
download them.
4. Finally, the client disconnects from the server, completing the email retrieval
process.

POP3 is connection and bandwidth efficient, after email download It becomes


disconnected from the server.

What is IMAP Protocol?

IMAP stands for Internet Message Access Protocol. It is one of the standard
internet protocol used by the email clients to retrieve email masseges from the mail
servers.

Unlike POP3, IMAP doesn’t download the messages from the server, rather it
synchronizes the client devices with the mail server and leaves the data on the
server. thus It allows multiple devices to get the same data from the server. User
changes like read/unread status or flagged emails synchronizes in real-time on all
devices.

As the data remains on the server to keep the data updated across all devices, IMAP
gets busy maintaining connections, therefore, IMAP supports partial message
retrieval, allowing users to download only the headers or specific parts of an email,
which saves bandwidth and time.

IMAP typically uses port 143 for non-encrypted connections and port 993 for
encrypted connections using SSL/TLS.

Figure 9: IMAP protocol workflow showing Users are synchronising emails to their email clients using
IMAP protocol.

The process of how IMAP works:

1. Email client connecting to the mail server on port 143 (or port 993 for SSL/
TLS).
2. The client authenticates itself using a username and password.
3. The client start synchronizing with the server. download emails, updates read/
unread status etc, and users can then read, organize, and manage their
emails directly on the server, with changes reflected across all devices in real
time.
4. Now, the session ends, the client disconnects from the server.

Mail Server Relation with DNS


A mail server and the Domain Name System (DNS) have a critical relationship that
ensures the proper delivery and security of emails across the internet. Here’s how
they work together:

1. DNS and Email Routing:

DNS ensures that emails are routed correctly by providing information about mail
servers and their priorities. Email delivery would be impossible without DNS
because senders would not know where to send the messages. The mail server for
a domain and subdomain can differ; DNS knows which mail server is responsible
for the domain or subdomain and provides the routing information accordingly.

2. DNS MX Records and Mail Server Configuration:

DNS is key to directing email traffic to the correct mail server. This is done
through MX (Mail Exchange) records. The MX record specifies the mail server
responsible for accepting email messages for that domain.

When someone sends an email to an address (e.g., user@xyz.com), the sender’s


mail server queries the DNS for the MX record of xyz.com to determine where to
deliver the email.
Figure 10: Email server connecting to DNS to find recipient mail server to deliver emails.

DNS Lookup Process for Email Delivery:

1. When an email is sent, the sending mail server performs a DNS lookup to find
the MX record for the recipient’s domain.
2. The MX record contains the mail server’s hostname (e.g., mail.example.com)
and a priority value (preference number) to determine the order in which mail
servers should be contacted if multiple MX records exist.
3. The sending server then performs another DNS lookup to resolve the
hostname in the MX record to an IP address (using an A or AAAA record).
4. Once the IP address is obtained, the sending server establishes a direct
connection to the recipient’s mail server to deliver the email.

3. DNS and Email Security:

Besides email routing, DNS enhances email security by providing other DNS records
like SPF, DKIM, and DMARC. SPF lists authorized IPs to prevent spoofing, DKIM
uses public keys to verify email authenticity, and DMARC defines actions for failed
checks and provides reporting. Additionally, Reverse DNS (PTR records) verifies
sender IPs to prevent spam sources. (We described more on the Email Security
Section).

Read more about DNS Server configuration: In this Guide.


How mail server deliver emails?

What is email delivery?


Email delivery generally means delivering email to its final destination, the user’s
mailboxes. When a user sends an email, the recipient can be a user with the same
domain (local user) or a remote domain (remote user). The mail server’s
responsibility is to deliver those emails to mailboxes.

We can divide email delivery into two categories:

• Local email delivery


• Remote email delivery

Multiple email delivery agents (MDAs) are built on the mail server (as we discussed
earlier) to perform email delivery. Local mail delivery is handled by the Local
delivery Agents (LDA), and remote mail delivery is managed by the Mail transfer
agent (MTA) or a separate remote delivery agent. (e.g., SMTP in postfix).
Figure 11: Email delivery agents (LDA, SMTP, and PIPE)

What is Local email delivery?

When the sender and recipient reside on the same mail server, they are considered
local users. Delivering emails to local users are called local email delivery, where
both users’ mailboxes reside on the same mail server.

Note: if the sender and recipient are part of the same domain but not on the
same mail server, we cannot consider them a local user because the sender’s
mail server has to communicate with the recipient’s (remote) mail server, and
the mailbox delivery will depend on the recipient’s mail server.
Figure 12: Local email delivery process: MTA deliver emails to LDA to deliver to local mailboxes.

Local emails can be delivered to a mailbox, appended to a file, or fed to another


program. Multiple local delivery agents (LDAs) can perform these operations.

What is Remote email delivery?

When the sender or recipient’s mailboxes are on different email servers, the
sending server has to communicate with the recipient mail server using Remote
Delivery Agents, and the email delivery target is not a mailbox (local mail).
Instead, forwarding mail to a different host (remote email) is considered remote
email delivery.
Figure 13: Remote email delivery process: sender’s mail server forwards email to recipient’s mail
server via remote delivery agent.

Email Delivery Complete Process:

When an email travels from sender to recipient Outlook, several stages and
technologies are involved with the whole delivery process. Below is a detailed, step-
by-step explanation of the complete delivery process:

1. The sender composes an email in their email client and clicks “Send” to
initiate the email delivery process.
2. The email client connects to the outgoing mail server (the SMTP server)
using the SMTP protocol to submit the email to the sender’s mail server.
3. The mail server authenticates the sender (using credentials like username
and password) to ensure they are authorized to send emails.
4. Mail Server checks the recipient’s domain to determine whether the recipient
is local (same domain) or remote (different domain).
5. Mail Server performs DNS lookup (If the recipient is remote) to find the
recipient’s mail server. It queries the MX (Mail Exchanger) record of the
recipient’s domain to get the address of the recipient’s mail server.
6. Optionally, the email may be scanned for spam, viruses, or malicious content
using filters or antivirus software.
7. The sender’s mail server establishes a connection with the recipient’s mail
server and transfers the email using the SMTP Protocol.
8. The recipient’s mail server accepts the email and performs its checks (e.g.,
spam filtering, authentication, etc.)
9. The recipient’s mail server checks the recipient’s mailbox to determine if the
recipient’s email address is valid and exists on the server. If the user doesn’t
exist, it bounces the mail to the sender’s address with a Non-Delivery Report
(NDR).
10. If the user is valid, the mail server stores the email in the user’s mailbox using
the Local Delivery Agent (LDA).
11. The recipient’s mail server may optionally send a delivery notification back to
the sender’s mail server to confirm successful delivery.
12. Now, The email client (e.g., Outlook) retrieves the email from the recipient’s
mail server using POP3/IMAP and displays it in the recipient’s inbox.

Chapter2:

Mail Server Types

In this chapter,
we will explore
how email
communicatio
n works at a
more detailed
level.

We will explain
the key
components
involved in
both incoming
and outgoing
email,
including the
different types
of mail servers
and protocols.

We will cover
essential
concepts like
POP3, IMAP,
and SMTP
servers and
how they
work.

I will guide
you step by
step,
describing
each topic
with diagram
and
animations to
ensure you
have a solid
understanding
of how these
email servers
work.

Let’s get
started.

In this section, we are going to discuss the followings:

• #1: Email Server Operations.


• #2: What is incoming email?
• #3: What is incoming mail server?
• #4: What is POP3 Server?
• #5: What is IMAP Server?
• #6: What is outgoing email?
• #7: What is outgoing mail server?
• #8: SMTP Server vs Outgoing Mail Server.

Email Server Operations


Every mail server has two primary operations: inbound and outbound operations.
In between, it processes emails for other things.

Figure 14: Gif Animation of email server operations: handling inbound and outbound emails.

A single mail server can do both receive and send operations. However, most of the
time, for safety and security, these tasks are handled separately with dedicated
servers are called incoming mail server and outgoing mail server.

Besides email send/receive, a mail server does more, like email routing, security
checks, backup, archiving, etc.

Figure 15: Gif animation of Mail server performing security checks, routing, backup, and archiving
before delivery.
In small organization, all these could happen on the same email server and in large
organization, these inbound and outbound operations can be separated to
dedicated mail servers. (we will describe the distributed mail server setup later).

Incoming mail Server

What is Incoming email?

Incoming email refers to the process of receiving an email from a sender to a


recipient. It occurs mainly in two main stages.

In the first stage, Email travels from the internet to the recipient’s mail server. That
mail is considered an incoming email for that server.

In the second stage, email moves from the server to the recipient’s mail client.
When the mail is being downloaded from the server to the mail clients, it is also
considered an incoming email for the client.
Figure 16: Incoming email process: email travels from the internet to the recipient’s mail server, then
to the email client.

What is Incoming mail server?

An incoming mail server is a server responsible for storing and delivering emails
to a user’s email client, such as Outlook.

When an email is sent to a recipient, it is first received and stored on the incoming
mail server. The email clients then connect to this server using protocols like POP3
or IMAP to retrieve the emails.
Figure 17: Gif Animation of users downloading emails from the incoming mail server using POP3 or
IMAP.

Note: ‘Incoming MTA‘ or ‘Mail Exchanger‘ refers to the ‘Incoming mail


server,’ the first server to receive emails from the internet. These terms
mean the same thing and can be used interchangeably in this context.

Based on the Protocol & functionality, We can categorize Incoming mail Servers
into two types:

• POP3 Server
• IMAP Server

What is POP3 Server?

When a POP3 service is installed on a mail server, it accesses emails from users’
mailboxes and delivers them to email clients. This is called a POP3 server (also
known as an incoming mail server). It enables email clients to retrieve emails
using the POP3 protocol.

POP3 service accesses the user’s mailbox directly from the mail server. Installing the
POP3 service on the mail server where the mailboxes exist is essential.

POP3 service has nothing to do with the mail server, nor does it contact it for its
operation. The POP3 server has its configuration to access mailboxes and deliver
emails to users.
Figure 18: POP3 server retrieving emails from mailboxes on the file system and delivering to users.

you can read how POP3 Protocol works, on this section above.

What is IMAP Server?

When we install and configure IMAP service on a mail server to access users’
mailboxes and deliver and synchronize emails to email client devices, it is called
IMAP Server.

Like POP3, the IMAP server is also called the Incoming Mail Server. POP3 and
IMAP have the same responsibility: to retrieve emails from the mail server. IMAP
Server uses IMAP protocol to communicate with the mail clients.

Figure 19: IMAP server retrieving emails from mailboxes and synchronizing with client devices.

IMAP is also a separate service like POP3; it doesn’t have any dependency on the
mail server. It can access mailbox data anonymously.
you can read how IMAP Protocol works, on this section above.

Outgoing mail Server

What is Outgoing email?

Outgoing email refers to any email message sent from an email client or server to
one or more recipients. It is the process of delivering an email from a sender to a
recipient’s email address. It operates in the outbound direction.

Figure 20: Outgoing email: emails sent from sender’s client to sender’s server, then to recipient’s
server.
Emails sent from an email client to a server, as well as emails transmitted from a
server to the internet, are both considered part of the outgoing email process. The
full outbound path for an outgoing email can be much longer, involving multiple
servers and hops, until it finally reaches the recipient’s mail server.

What is Outgoing mail server?

An outgoing mail server is responsible for sending emails from email clients or
applications to the recipient’s email server. When we send an email, our client
communicates with the outgoing mail server to deliver the message to the
recipients.

Figure 21: Gif Animation of email client sending email to outgoing mail server using SMTP Protocol.
Mail clients communicate with the outgoing mail server using SMTP Protocol to
send emails. It uses different protocols for email receiving.

When we send an email, it goes to the outgoing mail server first. Then, the
outgoing mail server either directly delivers that mail to the recipient’s mail server
or hands the email to another server to send it to recipients. The outgoing mail
server may not always send mail directly (we will explain this later).

SMTP Server vs Outgoing Mail Server:

An SMTP server is a specialized service that sends, relays, and delivers outgoing
emails, It is responsible to make sure messages are properly routed from the
sender’s mail server to the recipient’s mail server.

While outgoing mail servers are often referred as SMTP servers, the term “SMTP
server” has a broader meaning. It acts as a gateway system, enabling outgoing mail
servers to connect and deliver emails to the correct destinations.

However, “SMTP server” and “outgoing mail server” are not always the same. The
term “SMTP server” is used in wider contexts, like for bulk email campaigns or used
with specialized email software, while “outgoing mail server” typically refers to the
server used in standard email clients for everyday business communication or for
transactional emails.

So, we can say, Outgoing mail server doesnt mean always the SMTP Server, but
SMTP server always means a dedicated system responsible for outgoing email
operations.

Chapter3:

Advanced Mail Server’s

In this chapter,
we will discuss
about the
advanced
email servers.

Mail server
setup and
deployment
vary based on
the
organization’s
size and
requirements.

Sometimes, a
single server
may not be
enough to
handle all
necessary
tasks for email
processing.

Larger
deployments
often
introduce
specialized
email servers
like front-end,
back-end,
middleware,
security
systems,
gateway
systems, and
numerous
other servers,
each with a
specific
function.

These servers
perform
critical roles.
Without
describing
them, our
knowledge of
mail servers
will be
incomplete.

Let’s dive right


in!

In this section, we will discuss the following advanced email servers:

• #1: Mail Exchanger


• #2: Email Router
• #3: Mailhub
• #4: Mailbox Server
• #5: Email Gateway
• #6: Secure Email Gateway
• #7: Email Load Balancer
• #8: Email Proxy Server
• #9: Offline Mail Server
• #10: Webmail Server
• #11: Backup & Archive Server

What is a Mail Exchanger?


A Mail Exchanger or MX Server is a special type of mail server. It is the first contact
mail server for a domain defined in the DNS MX record.

When someone sends an email, the sending mail server queries the DNS to find
the MX records of the recipient’s domain. These records indicate which mail
servers are responsible for receiving emails for that domain.

We can set up multiple mail servers to receive emails for a domain. The MX record’s
priority values indicate the first server that should be contacted.
Figure 22: DNS MX records and Mail Exchanger (MX) servers for multiple domains.

A lower priority number indicates a higher priority for that server. When an email is
sent, the system first tries to connect to the mail server with the lowest priority
number this is called the primary mail server. If it fails, it moves to the next server
with the next lowest priority which is the secondary mail server.

What is an Email Router?

An email router (or transport server) is a special email server responsible for
deciding where to forward or relay emails based on routing rules. It does not store
mailboxes but acts as a relay to direct emails to the correct destination.

Email routers can route both in and outbound directions; any mail server can send
email to this server to get routed according to the policy. It can also route emails
based on domain, recipient, and IP.

Figure 23: Email Router forwarding emails based on routing rules, domains, and recipient policies.
Mail routers may apply security policies (spam filtering, virus scanning,
authentication) and load balancing optionally. It forwards emails to mail servers
using SMTP protocol.

What is a Mailhub?

A mailhub is a specialized email server for internal email routing. It receives and
redistributes local emails to its respective server. mailhub manages the flow of
emails within an organization. It acts as a central point for sending, receiving, and
processing local emails.

Figure 24: Mailhub routing internal emails to respective local servers within an organization.

In the above diagram, the user sends emails to various local and external users,
and the outgoing mail server receives the emails. It has been configured to send all
local emails to the mailhub and external emails to an email gateway.

mailhub will deliver user1@branch1.abc.com‘s mail to mail.branch1.abc.com and


user1@branch2.abc.com’s email to mail.branch2.abc.com and user1@abc.com‘s
email to mail.abc.com. each local user’s email will be routed by the mailhub to its
respective servers.

What is a Mailbox Server?

A mailbox server is a specialized email server responsible for storing, managing,


and providing access to user mailboxes. It holds emails, calendars, contacts, and
other related data for individual users or groups.

Mailbox servers are a critical component of email systems, enabling users to access
their emails via protocols like IMAP, POP3, or Exchange ActiveSync.
Figure 25: Mailbox server storing emails, contacts, calendars and files to user mailboxes.

Mailbox servers are often configured with storage systems. Storage can be internal
or external, and DAS, SAN, and NAS can be configured.

Based on the business requirements, multiple mailbox servers can be configured,


and a single mailbox server can accommodate multiple domain emails.

What is an Email Gateway?

An email gateway is a special type of mail server which communicates with


external mail servers on behalf of internal mail servers.

The main functionality of an email gateway is to relay emails, which is why they are
often referred to as Relay servers, SMTP relays, or Smarthosts. These terms are
used in different scenarios, but their primary purpose remains the same: to relay
emails for servers or clients.

Email gateways can come in different types, such as an email relay server for
sending outbound emails, or gateways designed for specific tasks like inbound
email gateway, outbound email gateway, or cloud-based email gateway.
Figure 26: Email gateway relaying emails between internal and external mail servers.

In small organizations, email gateways are often called as smarthost, which


forward emails to ISP-level secure email gateways for security checks. Smarthost
can be deployed in-house, or ISPs may provide smarthost services for small
organizations.

In larger organizations, where security and compliance are critical, Secure Email
Gateways (SEGs) are deployed. These are advanced email gateways with enhanced
security features, which we will discuss in the next topic.

What is a Secure Email Gateway?

A Secure Email Gateway (SEG) is an email gateway system with advanced


security features. It is designed to protect an organization’s email system from
various threats, such as spam, malware, phishing attacks, and other malicious
content.

Key features of a SEG include IP blocking, connection throttling, domain whitelist/


blacklist, spam filtering, virus and malware scanning, email encryption, data loss
prevention (DLP), and advanced threat protection (ATP).

It sits at the network parameter level and applies security policies to all inbound
and outbound emails to ensure secure and compliant email communications.
Figure 27: Secure Email Gateway (SEG) applying security policies to inbound and outbound emails.

What is an Email Load Balancer?

An email load balancer is a specialized email system that distributes incoming


and outgoing email traffic across multiple mail servers to ensure reliable and
efficient email delivery.

It prevents server overloads, improves delivery performance, and ensures


uninterrupted email delivery during server outages.

Inbound Email Load Balancing:

During Inbound operation, the load balancer distributes incoming email traffic
across multiple backend email servers to ensure efficient email delivery.

When an external email server sends an email to a domain, the DNS MX record
directs the email to the load balancer. The load balancer accepts the email, uses a
predefined algorithm like Round Robin or Least Connections to select an available
backend mail server, and forwards the email to it.

Figure 28: Inbound email load balancing: DNS MX record directs emails to a load balancer, which
distributes traffic across backend mail servers.

Backend mail servers receive the mail and immediately look up the routing table to
locate the appropriate recipient mail server and deliver to it.

Before email delivery, it could optionally scan emails for spam and viruses to
provide inbound email security.

Outbound Email Load Balancing:

During Outbound operation, the load balancer distributes outgoing email traffic
across multiple SMTP servers or gateways to ensure efficient and reliable email
delivery.

When a user sends an email, it is submitted to the load balancer. The load
balancer uses algorithms like Round Robin or Least Connections to select the best
SMTP server or gateway for email sending.
It delivers the emails to the specified SMTP server; then, it is the responsibility of
that SMTP server to communicate with the recipient mail server and deliver the
emails.

Figure 29: Outbound email load balancing: load balancer distributes outgoing email traffic across
multiple SMTP servers or gateways.

The email travels from the sender -> load balancer -> Outbound SMTP servers ->
recipient’s server. The load balancer sits in the middle, managing the
distribution of outbound emails to the SMTP servers.

What is an Email Proxy Server?

An Email Proxy Server is a specialized server that acts as an intermediary between


email clients and the backend email servers (like IMAP, POP3, or SMTP server).

It handles or proxies incoming and outgoing email traffic to the appropriate


backend server. Providing a layer of abstraction, security, and connection
efficiency.

How Does an Email Proxy Server Work?

Email clients connect to the Email Proxy Server as the first contact mail server,
using standard email protocols like POP3, IMAP, or SMTP. The proxy server listens
on specific ports for these connections.

The proxy server receives the client’s connection and determines the appropriate
backend email server to route the requests. During the traffic distribution, it can
load balance multiple backend servers.

Figure 30: Email proxy server acting as an intermediary between email clients and backend email
servers.
Clients only interact with the proxy server. They remain unaware of the backend
servers, and the proxy protects the backend servers from direct exposure to the
internet.

What is an Offline Mail Server?

An offline mail server is a mail server that is not constantly connected (temporarily
disconnected) to the internet but still allows users to send and receive emails.

It operates by storing emails locally and synchronizes with other mail servers
when an internet connection becomes available. This setup is obvious in
environments with intermittent connectivity, such as remote offices, military
operations, or ships at sea.

Figure 31: Offline mail server operating locally and synchronizing with ISP servers when connected to
the internet.
How an Offline Mail Server Works?

How It Receives Emails: When the mail server is offline, incoming emails from
external servers cannot be delivered immediately. Instead, these emails are
temporarily stored on an intermediate server (at ISP).

Once the offline mail server reconnects to the internet, it downloads the emails
from the ISP server using POP3 or IMAP. Emails are then stored locally and
delivered to user mailboxes.

Figure 32: Offline mail server downloading emails from ISP servers using POP3 or IMAP when
connected to the internet.

How It Sends Emails: When a user sends an email, it gets stored in the mail queue.
The server holds the email until it connects to the internet. Once online, the server
uses SMTP protocol to send the email directly to an ISP email gateway or the
recipient’s mail server.
If the internet connection is lost before the email is sent, it remains in the queue
until the next connection.

What is a Webmail Server?

What is Webmail?

We have already discussed Mail User agents (MUA) and email clients. Webmail is a
web-based email client that allows users to access their emails through a web
browser.

Unlike traditional email clients (like Microsoft Outlook or Apple Mail), webmail
doesn’t require any software installation on devices. We can access our emails from
any device with a web browser.

Examples of popular webmail services include: Gmail, Outlook.com , Yahoo Mail,


Zoho Mail etc.
Figure 33: Webmail server hosting webmail applications and communicating with email servers using
SMTP, IMAP, or POP3 protocols.

What is a Webmail Server?

A webmail server runs the webmail service. The backend web server installs and
configures the webmail application. The server hosts the webmail software, which
provides the user interface (UI) for accessing emails, contacts, and calendars from
the browser.

For email sending/receiving, the webmail server communicates with other email
servers using SMTP, IMAP, or POP3 protocols.

Webmail usually uses IMAP protocol to access emails from the mail servers. POP3
protocol downloads email messages on the clients’ desktops, as the webmail runs
on a different server than the user’s desktop. IMAP is ideal for this scenario.

Examples of webmail applications: Roundcube, SquirrelMail, Horde, RainLoop


etc.

Email Backup & Archive Server

What is Email Backup?

Email backup is the process of copying and storing emails to a safer location to
protect against data loss or server failure.
Email backup ensures the restorability of the email data in case of data lost,
corruption or for compliance and legal purposes.

What is an Email Backup Server?

An email backup server is a dedicated server or system designed to store and


manage email data backups.

Email backup server can be:

1. On-Premises: A physical or virtual server located within an organization’s


infrastructure.
2. Cloud-Based: A server hosted by a third-party provider (e.g., AWS, Google
Cloud, or specialized email backup services).
Figure 34: Email backup and archive server receiving user data from the mailbox servers and doing
backup.

Email backup can be manual or automatic at scheduled intervals. The backup


system provides search and restore functionality with data security, encryption, and
versioning. Some backup systems are scalable, often configured with SAN/NAS
storage.

What is Email Archiving?

Email archiving is storing and organizing emails in a long-term repository. It is


designed for retention, compliance, and efficient management of emails.

Email backup and archive objectives are almost similar but have some significant
differences. The primary focus of email backup is data recovery; in case of data loss
or corruption, we can restore emails from the backup. There is no objective for
holding the backup data for a long time.

Archiving ensures emails are stored in their original state for extended periods. It is
indexed for easy retrieval and stored in a way that meets legal, regulatory, or
organizational requirements.

Key purposes of email archiving:

• Compliance: There are legal or industry-specific regulations (e.g., GDPR,


HIPAA, FINRA) that require long-term retention of email communications for
historical records.
• Storage Management: Archiving reduces the load on primary email servers
by moving older emails to the archive storage.
• Quick Discovery: Simplifies searching and retrieving emails for legal or audit
purposes.

Chapter4:

Mail Server Security


In this chapter,
we will explore
Mail Server
Security.

Protecting
email
communicatio
n from
potential
threats and
vulnerabilities
are critical for
businesses.
Protecting
users from
server-level
brings
tremendous
benefits.

We will discuss
the layered
approach to
secure the
email systems.

We will dive
into essential
concepts like
email security,
email server
security, DNS-
level
protection,
email
gateway-level
protection and
how to harden
mail servers.

A solid
understanding
of email
security is
crucial to
ensure secure
email
communicatio
n.

Let’s dive right


in!

In this section, we are going to discuss the followings:

• #1: What is Email Security?


• #2: What is Email Server Security?
• #3: The Layered Approach to Email Security
• #4: DNS-Level Protection
• #5: Gateway-Level Protection
• #6: Mail Server Hardening

What is Email Security?

Email security is a set of technologies, policies, and best practices for protecting
email communication from phishing, spoofing, malware, ransomware, and
unauthorized access.

Email is one of the most common targets for cyberattacks, so organizations must
implement multi-layered security measures to safeguard sensitive information and
ensure reliable email delivery.

A robust email security framework involves authentication, encryption, filtering,


and threat prevention, which will reduce the risk of cyberattacks on email
infrastructure.

Figure 35: Email security components: data integrity, content filtering, malware protection, threat
prevention, data encryption, DNS-based protection, and secure email transmission.

Key Aspects of Email Security:

1. DNS-Based Protection – Prevents email spoofing and ensures domain


authenticity.
2. Securing Email Transmission – Encrypts emails in transit to prevent
interception.
3. Data Encryption & Integrity – Protects stored and transmitted email data
from unauthorized access.
4. Content Filtering & Malware Protection – Blocks spam, phishing attempts,
and malicious attachments.
5. Threat Identification & Prevention – Detects and mitigates cyber threats like
ransomware and zero-day exploits.
6. Access Control & Authentication – Ensures only authorized users can send,
receive, or access emails.

Organizations can strengthen email security enough to protect against email


threats by implementing these security measures.

What is Email Server Security?

Email server security refers to the measures and protocols implemented at the
server level to protect email communication from spam, phishing, malware,
unauthorized access, and data breaches.
Figure 36: Email server security: a single server protecting inbound and outbound email flows from
spam, phishing, malware, and unauthorized access.

In a small organization, a single server handles all the inbound and outbound
emails and is responsible for providing security for all outbound and inbound email
flows.

Clients can have their security measures, but if the inbound and outbound threats
can be handled at the server level, that will be more efficient; monitoring and
troubleshooting can be managed centrally.

Enterprise (ISP, Large Organization) email communication involves various servers


we discussed earlier; we need to provide security at every level of communication.
Figure 37: Email server security for large organizations: security applied at gateways, routers, and
mailbox servers.

Securing an email server requires a multi-layered defense strategy to mitigate risks


at different levels.

Importance of Email Server Security:

Email security from the server level is way more advantageous than client-side
security; it provides centralized control and protection for all email
communications. Below are the key reasons why server-level security is important:

• Centralized Protection for All Users: Server-level security ensures all users
are protected centrally. Clients may not have the expertise or tools to
implement adequate security measures independently.
• Centralized Anti-Virus and Anti-Malware Scanning: Servers can scan all
incoming and outgoing emails for viruses and malware before they reach the
client.
• Global Rate Limiting and Throttling: Servers can limit the number of emails
a user or domain sends to prevent email flood.
• Bulk Email Filtering and Quarantine: Servers can filter and quarantine
suspicious emails for all users, reducing the risk of malicious emails reaching
the inbox.
• Protection Against Email Spoofing and Phishing: Servers can implement
protocols like SPF, DKIM, and DMARC to verify the authenticity of incoming
emails and prevent spoofing. Clients cannot effectively implement or manage
these protocols on their own.
• Centralized Authentication and Access Control: Servers can enforce strong
authentication mechanisms (e.g., multi-factor authentication, OAuth) for all
users.
• Global Blacklisting and Whitelisting: Servers can maintain global lists of
blocked or allowed senders for the entire organization. Clients would need to
manage individual lists, leading to inconsistencies.
• Prevention of Data Leakage: Servers can enforce encryption for emails in
transit (e.g., TLS). And can implement Data Loss Prevention (DLP) policies to
prevent sensitive information from being sent outside the organization.
Clients may not consistently enable encryption or can intentionally bypass
such policies.
• Centralized Logging and Auditing: Servers can maintain logs of all email
activities for auditing and forensic analysis. Clients cannot provide a
centralized view of email activities across the organization.
• Reduction of Client-Side Hassles: Server-level security reduces the burden
on clients by handling complex tasks like encryption, filtering, and threat
detection. Clients may lack the technical knowledge or resources to manage
these tasks effectively.

The following are the key reasons for implementing email security at the server
level. There are more reasons, like compliance requirements, email traffic
monitoring and analysis, automated patching and updates, and enforcement of
email policies.

The Layered Approach to Email Security

When email travels from sender to recipient, it passes different layers of


communication. It could be multiple server layers or multiple layers of services on a
single server. There are specific email protection mechanisms that work on each
layer.

A layered security model safeguards each phase, from sending and receiving to
storage and user access.
Figure 38: Layered approach to email security: DNS level, gateway level, mail server hardening, client-
side security, and compliance frameworks.

We can divide email security into five essential layers:

1. DNS Level Protection – Prevents email spoofing and phishing using SPF,
DKIM, DMARC, RBL, and rDNS.
2. Gateway Level Protection – Filters spam, malware, and malicious content
before emails reach the inbox.
3. Mail Server Hardening – Implements encryption, authentication, and access
controls to prevent unauthorized access.
4. Client-Side Security – Protects end-users from phishing, credential theft, and
insecure email configurations.
5. Compliance & Legal Frameworks – Ensures adherence to data protection
laws and email retention policies.

By securing each layer, administrators can protect their email infrastructure and
continue uninterrupted email communication.

This article will discuss the first three layers related to email server
security. The remaining two points will be covered in another article.

What is DNS-based Email Security?

DNS-based email security measures are techniques and protocols that leverage the
Domain Name System (DNS) to enhance email security and prevent phishing, spam,
and other email-based threats.

These measures work by using DNS records to authenticate, verify, and enforce
policies for email communication.
Figure 39: DNS-based email security: recipient server checks SPF, DKIM, DMARC and BMI records
before accepting emails.

[Note]: Any email server can employ DNS-based email securities, but it is
recommended that these be implemented on the first contact mail server
(Gateway or Mail Exchanger).

Below are the key DNS-based email security measures:

• SPF (Sender Policy Framework): Prevents email spoofing by verifying sender


IPs via DNS records. Ensures only authorized servers can send emails for a
domain.
• DKIM (DomainKeys Identified Mail): Adds a digital signature to emails for
integrity verification. Uses DNS to publish public keys for validation.
• DMARC (Domain-based Message Authentication, Reporting, and
Conformance): Combines SPF and DKIM, sets policies for email handling, and
provides reports on authentication failures.
• BIMI (Brand Indicators for Message Identification): Displays verified brand
logos in emails for trusted communication. Requires DMARC and uses DNS to
point to logo files.
• DNSSEC (Domain Name System Security Extensions): Protects DNS records
from tampering using cryptographic signatures. Ensures the authenticity of
DNS data.
• MTA-STS (Mail Transfer Agent Strict Transport Security): Enforces TLS
encryption for secure email transmission. Uses DNS to publish policies for
mandatory TLS.
• TLS-RPT (TLS Reporting): Reports on TLS encryption failures for email
delivery. Uses DNS to specify where reports should be sent.
• DANE (DNS-Based Authentication of Named Entities): Uses DNSSEC to
associate TLS certificates with email servers. Prevents man-in-the-middle
attacks by validating server certificates.
• Reverse DNS (rDNS/PTR Records): Verifies that an email server’s IP address
matches its domain name. Used to detect and block emails from suspicious or
misconfigured servers.
• RBL/DNSBL (Realtime Blackhole Lists/DNS-based Blackhole Lists): Lists of
known spam sources or malicious IPs published in DNS. Email servers query
these lists to block emails from blacklisted senders.
• DNSWL (DNS Whitelist): Lists trusted IPs or domains known to send
legitimate emails. Email servers query DNSWL to allow emails from trusted
sources, reducing false positives.

What is Gateway level security?

Applying email security at the gateway level creates a protective layer that filters,
scans, and monitors incoming and outgoing emails at the network perimeter
before they reach the internal mail server or end users.

It acts as a firewall for email traffic, preventing threats like spam, phishing,
malware, ransomware, and data leaks.
Figure 40: Gateway-level email security: outbound and inbound gateways filtering email traffic.

[Note:] A single email security appliance can be enough for a small volume of
emails. Separating the inbound and outbound email flow with dedicated security
appliances is always recommended.

Below are the Key functions of an Email Security appliance:

• Spam Filtering: Block unwanted emails using content and reputation-based


filtering. AI and machine learning help detect advanced spam patterns.
• Malware Protection: Scan attachments for viruses and use sandboxing to
detect zero-day threats. URL scanning blocks links to malicious sites.
• Phishing Protection: Analyze email headers and links to detect phishing
attempts. Identify and block brand impersonation emails.
• Advanced Threat Protection (ATP): Use behavioral analysis and AI to detect
sophisticated attacks. Time-of-click protection verifies URLs when clicked.
• Data Loss Prevention (DLP): Scan emails for sensitive data and enforce
encryption. Block or quarantine emails violating DLP policies.
• Email Encryption: Use TLS for secure email transit and end-to-end encryption
(e.g., S/MIME) for confidential communication.
• Attachment Security: Block risky file types and use sandboxing or CDR to
sanitize attachments. Remove active content like macros.
• Graymail Filtering: Filter low-priority emails like newsletters. Allow users to
customize preferences for graymail handling.
• Authentication and Verification: Enforce SPF, DKIM, and DMARC to verify
sender legitimacy. Use BIMI to display verified brand logos.
• Quarantine and Reporting: Hold suspicious emails for review and provide
threat intelligence reports. Notify users of quarantined emails.
• Anti-Spoofing Measures: Detect display name spoofing and enforce SPF/
DKIM/DMARC checks. Prevent impersonation of trusted domains.
• Rate Limiting and Throttling: Limit email volume from single senders to
prevent email bombing. Throttle delivery during suspicious activity.
Mail Server Hardening

After DNS and Gateway level Security, the next step is configuring the Mail
Server Level Security by hardening the core mail server to protect it from
unauthorized access, data leaks, and abuse.

Figure 41: Mail server hardening tips to secure a mail server from spam and attacks.

Below is the list of essential Mail Server Security Protections:

• Mail Server Authentication & Access Controls: Enforce SMTP AUTH and
Multi-Factor Authentication (MFA) for secure logins. Use TLS encryption for
IMAP, POP3, and SMTP connections.
• Open Relay Prevention: Disable unauthenticated mail relaying to prevent
spam abuse. Restrict outbound emails to verified users.
• Access Control & Whitelisting: Use ACLs and IP whitelisting to limit SMTP,
IMAP, and POP3 access to trusted networks.
• Rate Limiting & Connection Throttling: Restrict login attempts and email
sending rates to prevent brute-force attacks and abuse.
• Mail Server Software Patching: Regularly update and patch Email Server
software and related softwares. Disable unused mail protocols and restrict
admin access.
• Chroot & Jail Services: Run mail server components in chroot or
containerized environments to limit damage from potential breaches.
• Phishing Prevention: Implement HELO/EHLO verification and greylisting to
filter suspicious senders.
• Content Filtering: Deploy Amavis, Rspamd, or SpamAssassin to block
phishing links and spam before delivery. Enforce sender authentication
checks.
• Secure Email Transport: Enforce SMTP TLS (STARTTLS, DANE, MTA-STS) to
encrypt emails in transit. Require TLS-only communication for trusted
partners.
• End-to-End Encryption: Use OpenPGP or S/MIME to encrypt email contents,
ensuring data privacy.
• Logging & Intrusion Detection: Monitor logs to detect brute-force attempts
and suspicious activity.
• Mail Queue Monitoring: Track outbound email queues to identify spamming
or compromised accounts before abuse escalates.
• DMARC & SIEM Integration: Analyze email authentication failures with
DMARC reports and integrate logs with SIEM systems for proactive threat
monitoring.

Final Note on Email Server Security:

DNS-based protection and Gateway Security measures can be combined and


applied to an Internet-facing Mail Server.

For outbound Emails, the Internal Mail Server must be hardened enough if
there is no Outbound Email Gateway. If possible, apply all the security measures
found at the Email Security Gateway to the Internal Mail Server.
Chapter5:

Mail Server Solutions

In this chapter,
we will explore
various mail
server
solutions
designed to
meet different
business
requirements.

Email servers
can be
implemented
in different
ways to
handle specific
business
needs, and we
will introduce
various
implementatio
ns step by
step.

We will explain
the key
concepts of
personal,
business, and
enterprise
email servers,
as well as
unified email
solutions and
email
marketing
solutions.

We will cover
how these
solutions
address
diverse needs.

understanding
these email
solutions will
help you make
informed
decisions
when setting
up an email
server for
different
environments.

Let’s dive right


in.

In this section, we are going to discuss the followings:

• #1: Personal Mail Server


• #2: Business Mail Server
• #3: Unified Email Solutions
• #4: Enterprise Email Server
• #5: Self-Hosted Email Solution
• #6: On-Premise vs Cloud mail Server
• #7: Email Hosting Solution
• #8: Email Marketing (Bulk Mailing) Solutions

What is Personal Mail Server?

A personal mail server is a privately hosted system. users can send and receive
emails without relying on third-party providers like Gmail or Outlook. It gives full
control over email security, privacy, and storage, making it an ideal choice for the
users, who needs more control over their communication.

Personal mail server is a popular choice for the people who are concerned about
their data privacy, tech enthusiasts knows self-hosting, or professionals who
want a custom email domain.

This email solution is popular because, the resource limitation fully managed by
the owner.
Figure 42: Key benefits of using a personal mail server for enhanced privacy, security, and flexibility.

What is Business Mail Server?

A business mail server is a comprehensive email solution. It provides basic email


functionality with productivity tools like address book, contacts, calendars, task
management, personal storage, etc, with optional collaboration tools like chat,
video-conferencing, resource sharing, team management, and document editing.

A business mail server helps organizations maintain their brand image with
practical and professional email communication. Business email solutions vary in
features, organization size, and requirements; multiple products are listed in the
next chapter.
Figure 43: Key features of a business mail server, such as email management, security, and backup.

What is Unified Email System?

A unified email solution integrates email, collaboration, and security tools into
a single platform.

Instead of using separate services for email hosting, calendars, contacts, chats,
video conferencing and file sharing. it combines everything into one system for
seamless communication.

Unified email solutions are enterprise-class mail servers with collaboration


features. Examples include Outlook 365 and Google Workspace as cloud
solutions and Microsoft Exchange, Zimbra Collaboration
Suite, IceWarp, BlueMind, Carbonio, etc, as self-hosted solutions.
Figure 44: Key features of a unified email solution, including communication, security, and cross-
platform support.

What is Enterprise Mail Server?

An Enterprise Email Server is a powerful, high-performance system designed for


large organizations like ISPs, large conglomerates, etc, that handle thousands or
millions of emails daily. It is often distributed geographically and offers
advanced security and scalability.

Enterprise email servers are integrated solutions where multiple systems


collaborate to build a reliable email solution.

Enterprise email server offers email and collaboration features with compliances
and seamless integration with enterprise business applications like CRM, ERP,
directory services, etc. It provides a central communication hub for many business
and business applications.
Figure 45: Key features of an enterprise mail server, such as scalability, email security, and multi-
tenant support.

What is Self-Hosted Email Server?

A self-hosted email server is a secure and independent email solution, where


individuals or organizations set up and manage their own mail server to avoid
third-party services.

This approach provides full control over email storage, security, and
customization. It can be set up on a local server or a remote VPS, offering
flexibility on cost and management.

Self-hosted email servers are ideal for individuals and small organizations with
budget constraint. Key benefits include complete control over emails, data privacy
and no vendor lock-in or recurring fees are involved.
Figure 46: Key features of a self-hosted mail server, such as data control, security, and No vendor
Lock-In.

Recommended read: How to Self-Host an Email Server: Expert Guide.

On-Premise vs Cloud Mail Server

What is an On-Premise Mail Server?

An on-premise mail server is a self-hosted email system that runs on a


company’s infrastructure instead of using cloud providers. It gives businesses
complete control over data privacy, security, and customization.

Organizations like enterprises, government agencies, and financial firms use on-
premise mail servers for data ownership, advanced security policies, and
integration with internal IT systems (e.g., Active Directory, CRM).

An on-premise solution requires higher setup and maintenance costs for ongoing
security management and hardware upgrades when email traffic grows.
Figure 47: Comparison of On-Premise Setup and Cloud Mail Server features, covering control,
customization, and security.

What is a Cloud Mail Server?

A cloud mail server is a remotely hosted email server managed by a cloud


provider, offering a simplified solution to avoid the complexities of maintaining an
on-premise or self-hosted server. It provides scalable, reliable email hosting without
the need for in-house infrastructure.

It provides easy setup, high uptime, secure email storage, and automatic backups
without maintenance.

However, they come with subscription fees, privacy concerns, and limited
customization. These services are ideal for businesses, remote teams, and non-
technical users seeking hassle-free, managed email solutions.

What is Email Hosting Solution?

An email hosting server is a special kind of mail server configured to allow


customers to host their emails by themselves. Users can create and manage
their own email accounts using their domain name (e.g., your@domain.com).
These servers can be shared, VPS-based, or dedicated, providing different levels of
control and performance.

Email hosting servers are operated by special software called web hosting panels
or control panels. In each control panel, mail server software is built-in, which
handles the email operations.

A control panel provides a user-friendly interface for configuring mail accounts,


domains, spam filters, and security settings without manual command-line work.
ISPConfig, cPanel, Plesk, and CyberPanel are the most popular control panels.
Figure 48: Key features of an email hosting server, such as admin panel, multi-domain hosting and
security filters.

What is Email Marketing System?

An Email Marketing System is a special implementation of a mail server. It is not


like a regular mail server. It sends bulk emails for newsletters, promotional
campaigns, and automated email sequences. These servers focus on engaging and
converting recipients rather than handling transactional emails.

The email marketing system integrates two pieces of software. First is the email
marketing application, which is like Outlook and handles email marketing
operations. The second is the SMTP server or MTA. In the next section, we
discussed various lightweight Linux-based mail servers that can perform as SMTP
servers.
Figure 49: Key features of an email marketing system, such as email automation, list management
and tracking.

Chapter6:

Mail Server Examples

In this chapter,
we will
introduce
various mail
server
software’s for
both Windows
and Linux
environments.

There are a
wider range of
mail server
products
available on
Linux platform
than Windows.
we will cover
key software
solutions for
both
platforms.

We will
showcase
different types
of mail
servers, like,
simple mail
servers,
business mail
server, email
collaboration
software,
enterprize
softwares and
lightweight
SMTP systems.

We have
categorized
the solutions
and provided
a short
description
with each
product.

Let’s dive right


in!

In this section, we are going to discuss the followings:

• #1: Windows mail servers.


• #2: Linux Mail Servers.
• #3: Linux eMail and Collaboration Servers.
• #4: Linux Lightweight Mail Servers.

Windows Mail Servers

The mail server software listed below has been carefully selected. These
renowned solutions have been widely used in the industry for a long time.

More Windows mail servers are available on the market, but they often lack of
features and are not in active maintenance.
Figure 50: Popular Windows mail server software: hMailServer, MailEnable, SmarterMail, MDaemon,
Axigen, IceWarp, Kerio Connect, Xeams, SurgeMail, RaidenMAILD, and Microsoft Exchange.

1. hMailServer: Open-source and lightweight mail server, Supports SMTP, POP3,


IMAP, and spam filtering. Ideal for small to medium businesses.
2. MailEnable: Offers free (Standard Edition) and paid (Professional/Enterprise)
versions. Supports webmail, calendaring, and collaboration. Designed for
small to medium businesses.
3. SmarterMail: Commercial email server with a free version available. Offers
email, calendaring, and collaboration tools. Scalable for hosting providers and
businesses.
4. MDaemon: A robust Windows-based email server. Includes email,
calendaring, and collaboration features. Suitable for small to medium
businesses.
5. Axigen: commercial email server with a free version. Includes email,
calendaring, task management, and mobile synchronization. ideal for small
businesses and enterprises.
6. IceWarp: Commercial Windows-based email and collaboration server.
Includes email, chat, and video conferencing. Scalable for small businesses to
enterprises.
7. Kerio Connect: A Commercial Windows-based email server with collaboration
tools. Offers email, calendaring, and mobile synchronization. Suitable for
small to medium businesses.
8. Xeams: Self-hosted email server with a focus on spam filtering and security.
Commercial and free version available. Supports SMTP, POP3, IMAP, and
email archiving. Ideal for small businesses and individuals seeking a
lightweight, secure email solution.
9. SurgeMail: A high-performance email server for Windows. Free and
Commercial version available. designed for hosting providers and
enterprises, offering robust scalability and advanced security features.
10. RaidenMAILD: A lightweight commercial mail server for small businesses.
Supports multiple email accounts, SMTP, POP3, and IMAP, with an admin
interface. good for Small businesses with basic email hosting needs.
11. Microsoft Exchange Server: A full-featured collaboration suite with email,
calendaring, and task management. Designed for enterprise environments.
Linux Mail Servers

There are many mail server products available for Linux. Below are some of the
well-known projects.

Linux mail servers can be categorized into various types: some are basic, and some
offer more features. Most Linux mail servers are scalable and designed to support
large organizations.

Figure 51: Popular Linux Mail Server Software: Apache James, Axigen, Citadel, CommuniGate Pro,
Exim, Poste.io, Postfix, Qmail, Sendmail, Stalwart Mail Server, Zentyal, Modoboa, and iRedMail.

1. Apache James: An open-source mail server written in Java. Supports SMTP,


POP3, and IMAP. often used for testing and development environments.
2. Axigen: A commercial mail server with a free version for limited use. Offers
email, calendaring, and collaboration features, known for its security and
scalability.
3. Citadel: An open-source mail server with basic groupware features, supports
email, calendars, and chat. easy to set up and manage for small to medium
organizations.
4. CommuniGate Pro: A commercial mail server with high scalability and
reliability. supports email, VoIP, and collaboration tools. used by enterprises
and service providers.
5. Exim: A free and open-source mail transfer agent (MTA). widely used on Unix-
like systems. known for its flexibility and extensive configuration options.
6. Poste.io: A commercial mail server with a free tier. focuses on simplicity and
security. includes email, calendars, and webmail in a single Docker container.
7. Postfix: A free and open-source mail transfer agent (MTA). designed for
security and ease of configuration. widely used as a replacement for
Sendmail.
8. Qmail: A secure and open-source mail transfer agent (MTA). known for its
modular design and security features. less actively maintained but still in use.
9. Sendmail: One of the oldest and most widely used mail transfer agents (MTA).
open-source and highly configurable. often replaced by Postfix or Exim in
modern setups.
10. Stalwart Mail Server: A modern open-source mail server. designed for
security, scalability, and ease of use. supports JMAP, IMAP, and SMTP
protocols.
11. Zentyal: An open-source mail server and network gateway. includes email,
DNS, firewall, and more. designed for small to medium-sized businesses.
12. Modoboa: An all-in-one mail server solution that includes a web-based
management interface, spam filtering, and webmail. It supports multiple
domains and integrates easily with Postfix and Dovecot.
13. iRedMail: Open-source all-in-one mail server solution. integrates Postfix,
Dovecot, and SpamAssassin for a complete email system with webmail and
security features.

Linux eMail and Collaboration Servers

Linux email and collaboration servers provide comprehensive solutions for


businesses to manage communication, scheduling, and collaboration. These
platforms offer email services and integrate calendars, task management,
document sharing, etc.

Below are some of the most well-known Linux-based email and collaboration
platforms (open-source and commercial solutions).
Figure 52: Linux Email and Collaboration Servers: Scalix, Zimbra, HCL Domino, IceWarp, Kerio
Connect, Open-Xchange, Kolab, and SOGo.

1. Scalix: A commercial collaboration platform based on open-source


technology. offers email, calendaring, and task management. integrates with
Microsoft Outlook.
2. Zimbra: A commercial collaboration platform with an open-source edition.
provides email, calendars, contacts, and file sharing. known for its modern
web interface.
3. HCL Domino: A commercial collaboration platform formerly known as IBM
Notes. offers email, applications, and workflow automation. targets enterprise
environments.
4. IceWarp Mail Server: A commercial collaboration platform with email, chat,
and video conferencing. focuses on ease of use and scalability. suitable for
businesses of all sizes.
5. Kerio Connect: A commercial collaboration platform with email, calendars,
and task management. integrates with MS Outlook and mobile devices. best
for small businesses.
6. Open-Xchange: A commercial collaboration platform with an open-source
edition. provides email, calendars, and document editing, integrates with
third-party apps.
7. Kolab: An open-source collaboration platform with email, calendars, and file
sharing. designed for privacy and security, suitable for businesses and
governments.
8. SOGo: An open-source collaboration platform with email, calendars, and
contacts. supports various email clients. focuses on simplicity and scalability.

Linux Lightweight Mail Servers

Below are some of the most popular lightweight mail servers available for Linux.
They offer efficient, flexible, and minimalistic solutions for handling email services,
particularly in smaller or specialized environments.

These servers can also be used as SMTP for sending bulk emails, making them ideal
for forming a self-hosted email marketing solution.

Figure 53: Lightweight Linux Mail Server Software: WildDuck, Haraka, ZoneMTA, Mailcow, Mailu,
Postal, Mail-in-a-Box, OpenSMTPD, Mailpit, Maddy, and MailSlurper.

1. WildDuck: A modern mail server software for IMAP and POP3. scalable,
Unicode-first, and API-controlled. To create a complete mail server, bundle it
with Haraka and ZoneMTA.
2. Haraka: A modern, high performance, flexible SMTP server. Haraka is an open
source SMTP server written in Node.js.
3. ZoneMTA: Provides granular control over routing different messages. It
packed with features more common to commercial software, ie. message
rewriting, IP warm-up or HTTP API for posting messages.
4. Mailcow: An open-source SMTP server and mail server suite. Docker-based
and easy to deploy. includes spam filtering, antivirus, and webmail.
5. Mailu: An open-source SMTP server and mail server suite. packaged as
Docker containers for easy deployment. includes spam filtering and webmail.
6. Postal: An open-source SMTP server designed for sending and receiving
transactional emails. focuses on scalability and ease of management, ideal for
developers.
7. Mail-in-a-Box: An open-source SMTP server and all-in-one mail server
solution. designed for simplicity and privacy, includes spam filtering and
webmail.
8. OpenSMTPD: A secure and open-source SMTP server from the OpenBSD
project. focuses on simplicity, security, and ease of use. suitable for both small
and large setups.
9. Mailpit: A lightweight SMTP server designed for email testing and
development. captures and displays emails in a web interface. ideal for
debugging email workflows.
10. Maddy: A modern and lightweight mail server that aims to be a single-binary
alternative to Postfix, Dovecot, and OpenSMTPD. It focuses on simplicity,
security, and ease of deployment.
11. MailSlurper: A small, portable SMTP server for testing and development.
captures emails and provides a web interface for viewing them, ideal for
debugging email workflows.

This is it !!

Here, we explained different types of mail servers and their functions


with examples and illustrations and provided a step-by-step approach to
learn each concept. I hope this guide will help you easily understand
Email Servers and related concepts.

Now, we want to hear from you

Did we miss anything? Are any of the steps unclear and need further explanation? If
you want us to cover any other tutorials, please let us know by leaving a comment
below.

Your feedback is very important. It helps us to improve and provide better content.

Thanks

Tags

# how mail server works # what is email client # what is email security

# what is imap # what is mail server # what is pop3 # what is smtp

Rahman Munna
Rahman Munna is an accomplished IT professional with over 15
years of experience specializing in System Administration across
Linux, Windows, and Virtualization Technologies. With a strong
focus on Email and Web Server Administration, Rahman has a
proven track record of managing and optimizing complex IT
infrastructures for multinational organizations.
PREVIOUS POST NEXT POST

Linux DNS Server Incoming and Outgoing


Configuration: Detailed Mail Server: Detailed Guide
Guide [2025] [2025]

Related Posts

MailEnable: A Free Mail Server for How to Self-Host an Email Server:


Small Business [2025] Expert Guide [2025]
July 3, 2025 May 19, 2025

Incoming and Outgoing Mail Server:


Detailed Guide [2025]
April 27, 2025
Leave a Reply
Your email address will not be published. Required fields are marked *

Name * Email *

Add Comment *

Save my name, email, and website in this browser for the next time I comment.

I accept the Privacy Policy

Post Comment

Subscribe for Tutorials, Books & Resources

Name Email

Subscribe
WhatsApp:
About Us
+8801912064483
Contact Us
System Administrators Privacy
Blog Policy Email:
info@mailservergu
Terms And Conditions
ru.com

© 2025 - MailServerGuru. All Rights Reserved. Digitally Enhanced by Adapts Today

You might also like