
Email is a tool that has been announcing its death for years, but it is more alive than ever despite the emergence of friendly communication tools such as chats, social networks or messaging applications.
The truth is that despite all the current tools email is essential, it is a tool that refuses to die and, despite predictions, is likely to be with us for many years to come.
For decades, the first thing anyone got on the Internet was a mailbox from a free service provider, mainly because it is the gateway to other sites, such as the most popular social networks, all of which require you to register many times with e- Send only in order to send notifications, serve for password recovery or simply send ads.
Currently, e-mail is forgotten among friends and family, but at a business, commercial or institutional level, e-mail is still one of the most important means of communication, both internally and especially for external communication with customers, suppliers and users in general.
What is a mail server?
E-mail is a system for exchanging messages between two users in a digital way. The fact that it is called an email and not a message is because it works in a similar way to traditional mail, when a message is sent, it arrives in a mailbox, which is nothing more than an account on the server where it is stored and waiting to be read.
Originally email was a very simple program, in the early days of computers there were networks of terminals connected to a central server where it was necessary to exchange messages between users of the same server.
Messages had a recipient, a subject and a message, when sending a copy was saved in a folder called a mailbox owned by the recipient, everything worked locally on the server itself, except that there were connected users from the terminal, there was no network as such.
Eventually the need to send messages to users belonging to other servers was born, the same concept of local messages was adopted and the user added an at sign to the name of the target server, for example if the user was previously Alvaro from there it would be [email protected] that is, the user plus the name of the server to which the user belongs.
The protocol was created to enable communication between different servers and the exchange of messages. SMTP which was responsible for sending and receiving e-mail, over time users stopped connecting to the server and used their own computers instead of remote terminals
Because of this, new protocols were created for retrieving e-mail from the main server, thus the Post Office Protocol (POP) was born, and eventually the Internet Message Access Protocol (IMAP).
Since then, the mail system has consisted of a number of independent services working together, each performing a specific task.
There are services that are in charge of receiving and sending e-mails, such as released or postfix (SMTP), others allow access such as Dovecot, Courier or Cyrus (IMAP/POP3) with services such as SpamAssassin and ClamAV to combat spam or malware.
Types of mail servers
First we have the server SMTP (Simple Mail Transfer Protocol), which is responsible for transferring messages between servers.
To access mail, we can use two different protocols, the first is the protocol IMAP (Internet Message Access Protocol) or older POP3 (Post Office Protocol version 3) The main difference between IMAP and POP3 is the way mail is accessed.
All of these protocols date back to the 70s and 80s and are transmitted in clear text, so a layer of encryption is added to the messages, variants such as SMTPS, IMAPS Y POP3S that it is basically the same protocol, although it supports communication and encrypted messages SSL/TLS
A simple mail transfer protocol
When sending a message, it becomes the sender’s first SMTP server, receives the sender’s message, and searches for the recipient’s SMTP server to deliver the email.
When the recipient’s SMTP server receives an e-mail, after checking whether it is spam or not, checking whether there are viruses or dangers in the e-mail, it checks whether the recipient is a valid recipient and can receive the e-mail. If possible, it places the email in a mailbox, otherwise it sends it back to the first SMTP server to deliver it to the sender as bounced.
The SMTP protocol uses port 25 and 26 by default as an alternative for open email in addition to port 587 on some servers, then port 465 is used as a secure port with support for SSL/TLS encryption.
Protocol for accessing Internet messages
In the case of the IMAP protocol, used to synchronize email between devices, email is always stored on the server and only one copy is downloaded for viewing. It has the huge advantage that it can be synchronized on different devices so that emails are always available on all of them.
Emails are always physically on the server when a folder is created, email is moved, marked as read, deleted, or any change made in the email client is replicated on the server and everywhere else. other devices.
It is ideal for editing mail from several computers, phones or tablets simultaneously or alternately. The default IMAP port is 143, although the port changes to 993 when using the IMAPS variant.
From the point of view of data preservation, it has the advantage that all emails are together, which makes it easier to create backup copies.
Post Office Protocol version 3
On the other hand, the POP3 protocol downloads e-mail directly to the user’s computer, it was widely used in the past because it allows e-mail to be offline.
Although it is possible to download them and leave a copy on the server for other devices to download, it does not behave like IMAP, emails marked as read are deleted, the sent folder is not synchronized, for example.
A little out of order at the moment as it now connects you 24 hours a day, but for security reasons it shortens the time emails are on the server and in case attackers can’t harm previously received and already downloaded emails.
The default port is port 110 and the secure port with encryption is 995
Install the mail server on Linux
The installation below is just a practical example, it’s a very simple installation that shows how easy installation is, however a full and functional server requires a lot more configuration work, especially in terms of security.
Debian/Ubuntu
First, make sure exim is not installed:
apt-get remove --purge exim4 exim4-base exim4-config
Then proceed with the installation of Postfix, the service responsible for receiving and sending e-mails.
apt-get install postfix
The following values are set in the configuration file /etc/postfix/main.cf:
mydomain = ejemplo.com myhostname = mail.ejemplo.com myorigin = $mydomain mydestination = $mydomain, $myhostname, localhost.localdomain, localhost destinos mynetworks = 192.168.1.0/24, 127.0.0.0/8 inet_interfaces = all
In order to receive email from abroad, the domains mail.example.com and example.com must be DNS pointed with their respective MX, eventually the service will be restarted to apply the changes.
service postfix restart
Then switch to Dovecot, which gives users access to email
apt-get install dovecot-imapd dovecot-pop3d dovecot-common
Make a setting related to authentication
sed -i 's/#disable_plaintext_auth = yes/disable_plaintext_auth = no/g' /etc/dovecot/conf.d/10-auth.conf
The service will be restarted to apply the changes:
service dovecot restart
To serve as a full e-mail server, it is necessary to install other services, such as SpamAssassin or ClamAV So adjust Postfix and Dovecot configuration regarding encryption and authentication options. here we don’t touch DNS configuration like MX, SPF, DKIM
CentOS/RHEL/Fedora
Installing Postfix on CentOS/RHEL family systems is quite similar, its own package manager varies, on Fedora the package manager is currently dnf instead of yum, but the package names are the same,
Initial installation:
yum install postfix
the service begins
service postfix start
It is configured to start automatically with the system:
chkconfig postfix on
The following values are set in the configuration file /etc/postfix/main.cf:
mydomain = ejemplo.com myhostname = mail.ejemplo.com myorigin = $mydomain mydestination = $mydomain, $myhostname, localhost.localdomain, localhost destinos mynetworks = 192.168.1.0/24, 127.0.0.0/8 inet_interfaces = all mynetworks_styles = subnet home_mailbox = Maildir/
The service will be restarted to apply the changes.
service postfix restart
Continue installing Dovecot:
yum install dovecot
Depending on the distribution, the following is set in the /etc/dovecot/dovecot.conf or /etc/dovecot.conf file:
protocols = imap pop3 lmtp
The service will be restarted to apply the changes.
service postfix restart
It is configured to start automatically with the system:
chkconfig dovecot on
Install the mail server on Windows Server
The server for Windows offered by Microsoft is Windows Mail Server, but it is not available for all versions of Windows, only for Windows Server versions, that’s why we chose hMailServeropen source server available for the following versions of Windows
- Microsoft Server 2016 (all editions)*
- Microsoft Server 2012 (all editions)*
- Microsoft Server 2008 (all editions)
- Microsoft Server 2003 (all editions)
- Microsoft Windows 10 (all editions)*
- Microsoft Windows 8.X (all editions)*
- Microsoft Windows 7 (all editions)
- Microsoft Windows Vista
- Microsoft Windows XP Professional Service Pack 3
This will allow us to test install it on any version of Windows, for example on our computer or even better, for example, inside a Windows installation inside Virtual Box.
After downloading, the installation should begin. It’s a simple process, you just have to remember to activate the option Complete installationwith server Y administrative tools.
During the installation, you will be asked for a password to manage the service. If you are installing for production use and not a test environment, a strong password is recommended because it is available over the Internet.
Again, depending on the installed database drive, you should select either MySQL or MSSQL database type. This database is used to store data and configuration of the mail server itself

Once the installation is complete, you can create email accounts and customize various parameters such as the size of each field, email signature, etc.

It must be taken into account that the incoming and outgoing ports must be allowed in the Windows firewall in order to send and receive mail normally.
Examples of popular mail servers
There are service providers that allow you to connect a specific domain to your own email platform. To name the most famous, we have GMail from Google, Hotmail and Outlook from Microsoft. This allows you to use your own domain with the same email platform and all the accompanying tools as you would with a generic Hotmail/Gmail email account, but these are not the only ones, we’ll cover them, check out the top five business or enterprise email platforms.
gmail
It is one of the most famous email service providers, it is relatively new since it was launched only in 2004, although it still managed to attract a large number of users mainly due to the space it offered during that time.
In its early days, Gmail was revolutionary because it offered 1GB mailboxes, which may seem small today, but Hotmail, the most used email service, offered barely 2MB back then. Over the years, Gmail has grown to the free 15 GB it is today.
Another strong point has always been its webmail with a minimalistic, modern and very fast style unlike its competitors, it has also integrated its search technology into Gmail which allows searching within stored emails with a speed and efficiency that no other system can offers mail. ago.
All this has allowed Gmail to position itself not only as a mass free email service provider, but also as a general business email service provider, especially by providing tools such as Google Doc and Google Drive.
Although Gmail is free if you use the @gmail mailbox, it is possible to rent the GSuite service with a monthly subscription, with which you connect your own Internet domain, for example @mycompany.com, and use it on your platform with everyone can take advantage of the benefits and tools of the Google ecosystem.
Microsoft Office 365
It is one of the most widely used free email providers in the world, it was the largest provider for many years until it was surpassed by Gmail in terms of users.
Hotmail was created in 1995 and was later bought by Microsoft in 1997. It was a turning point in email. It gained users very quickly because e-mail was supposed to be simple, fast and secure, accessible from anywhere on the Internet, something innovative at a time when desktop clients were mainly used to handle e-mail.
Over the years, Microsoft has integrated its hosting services into its infrastructure and integrated them into its corporate web services, recognizing the importance of the business operations that Microsoft provides.
Just like Gmail, Microsoft’s infrastructure also allows you to connect your own company domain to the system and use webmail and Outlook tools with your own domain, integrates with Office 365, One Drive and all Microsoft cloud tools.
Zoho
It is an Indian origin cloud and SaaS company offering personal and business email services through Zoho Mail, as in the previous case you can get a free mailbox under the same domain or we can get one additional custom domain
It is mainly intended for the business market and allows the management of multiple accounts from the same interface. It offers free accounts with basic features and paid accounts with additional features.
What differs from the previous solutions is that even in the free version you can add a custom domain, something that both Microsoft and Google discontinued in the case of Zoho if you need more than one domain if you need a paid account.
FastMail
It’s an Australian email provider with servers in the United States and Europe that was acquired by Opera Software a few years ago, although it operates independently, it no longer offers free accounts after the acquisition, currently only offering a 30-day free trial.
As in the previous cases, the platform allows you to create an account under the fastmail.com domain, as well as under a personalized domain, unlike the previous cases, the mailbox under the company domain is not free. So when you stop using it, the payment could be registered by someone else, which can be a security risk, in case there is a service associated with this framework, it is always recommended to use your own domain.
Conclusion
We review the entire history of the mail system, its components, its services, we also perform a basic installation of the mail service on Windows and Linux to offer more options, it is also a basic installation as a test More complete and secure email service, more work is needed to refine the configuration and options.
If we have knowledge or want to acquire it, installing our own mail server on a VPS server is the best option in terms of possibilities and costs, especially when it comes to scaling the service, but when we do not want and need to complicate it. If you are looking for something a little simpler, the best option is a service provider emails like the ones mentioned.