Electronic mail has changed and developed over time. Statistics show that nearly 2,840,000 emails are sent every single second (InternetLiveStats.com). Our world revolves around this service that connects us.
One thing most people don’t understand is how email works, or more importantly, where it actually resides. This is knowledge that you will need in the future, so best to learn it now. How exactly does email work?
It’s actually pretty cool.
Note: Some of the things covered here, you may or may not be familiar with, but they will be covered in more detail in follow-up articles.
How email works
First, a mail user agent converts a message into text. Once converted, the mail user agent uses DNS to connect to the configured mail transport agent via the Simple Mail Transfer Protocol (SMTP). The sending mail agent then performs a mail exchanger record (MX record) lookup of the destination, connects to the destination mail transport agent, and finally delivers the email.
When delivery happens, the destination mail transport agent reviews the email and sends an acknowledgment that the message was received. The email is then delivered either to a virtual user or handled with a specific action (bounced, discarded, etc.)
For every email that is sent, a log entry is created in the mail client. Going over the basics of mail servers and its components is important to system administration. In this article, I’ll start with the basics and cover what you might need to know before configuring mail servers on Red Hat Enterprise Linux (RHEL)-based environments.
Email service components
As I mentioned earlier, there are three components of email services: mail user agents, mail transport agents, and mail delivery agents. Each component has its own purpose and a core reason for making email work in general.
I'll go over what happens when an email is sent once again, but this time in more detail.
Mail user agents
A mail user agent is essentially an email client. It helps the user to read the mail they receive and to write the email they want to send out. The mail user agent also actively receives and sends the email itself.
Mail transport agents
A mail transport agent is essentially an email service on a server. It is responsible for making sure that the mail is delivered from location to location. When you send an email, the mail server (often referred to as the SMTP server) processes the mail through the EHLO
/HELO
, which is a command it sends to identify itself when trying to connect to another mail server via SMTP. Once the receiving mail server is able to identify the destination mail server, SMTP relays the email to the destination server.
There are other parts of the SMTP process that are important to identify as well. Once the connection is made, commands are sent to the destination server in order for the email to be accessible by the mail user agent:
- The
MAIL FROM
command identifies the original sender of the email. - The
RCPT TO
command gives the recipient’s address. - The
DATA
command starts the process of sending the message body to the destination. - A dot by itself on a separate line stops the message.
- The
QUIT
command closes the SMTP session and finalizes the process.
Mail delivery agents
A mail delivery agent is essentially an agent that delivers email on a local machine. There are two main protocols when mail user agents send email: the latest version of the Post Office Protocol (POP3) and the Internet Message Access Protocol (IMAP).
POP3 allows you to download copies of your email to your personal computer. These copies are usually unchanged, but it is common to unintentionally configure POP3 to delete the server copies after downloading the local copies. POP3 is best for those who prefer to have a backup of their email and don’t need to spend a lot of time online, but still need to read messages.
On the other hand, IMAP allows you to read email as it appears on the server. IMAP is best for those who have a lot of different people connecting from different sources, or an email account user who prefers to have their messages on a server rather than on their local machine.
Each protocol has its own ports that are usually available by default for your mail client. For POP3, the ports are 110 (default) and 995 (secure). For IMAP, they’re 143 (default) and 993 (secure).
Now that you're more familiar with the components and what they do, you can move on to the good stuff. System administrators live within their terminal, and this article covers configuring mail as such. In my past as a system administrator, setting up, configuring, and managing mail servers has been a helpful skill-set to have. I had a hard time remembering the services and what to install, so I used acronyms to remember commands, files, etc.
Learning mail services can be beneficial, whether in a work environment or a personal one. If you are ready to get started with installing an email server, I encourage you to read how to install and configure Postfix and how to install and configure Dovecot.
Sobre el autor
I currently work as a Cloud Support Supervisor for Acronis . I have worked with Linux and OpenSource tools for a decade, constantly wanting to make new resolutions for obstacles and always training others on improving systems as a systems administrator. I’ve helped manage and maintain elaborate servers and websites over the years. In my spare time, I enjoy spending time with my dogs, reading, and playing video games.
Navegar por canal
Automatización
Las últimas novedades en la automatización de la TI para los equipos, la tecnología y los entornos
Inteligencia artificial
Descubra las actualizaciones en las plataformas que permiten a los clientes ejecutar cargas de trabajo de inteligecia artificial en cualquier lugar
Nube híbrida abierta
Vea como construimos un futuro flexible con la nube híbrida
Seguridad
Vea las últimas novedades sobre cómo reducimos los riesgos en entornos y tecnologías
Edge computing
Conozca las actualizaciones en las plataformas que simplifican las operaciones en el edge
Infraestructura
Vea las últimas novedades sobre la plataforma Linux empresarial líder en el mundo
Aplicaciones
Conozca nuestras soluciones para abordar los desafíos más complejos de las aplicaciones
Programas originales
Vea historias divertidas de creadores y líderes en tecnología empresarial
Productos
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Servicios de nube
- Ver todos los productos
Herramientas
- Training y Certificación
- Mi cuenta
- Soporte al cliente
- Recursos para desarrolladores
- Busque un partner
- Red Hat Ecosystem Catalog
- Calculador de valor Red Hat
- Documentación
Realice pruebas, compras y ventas
Comunicarse
- Comuníquese con la oficina de ventas
- Comuníquese con el servicio al cliente
- Comuníquese con Red Hat Training
- Redes sociales
Acerca de Red Hat
Somos el proveedor líder a nivel mundial de soluciones empresariales de código abierto, incluyendo Linux, cloud, contenedores y Kubernetes. Ofrecemos soluciones reforzadas, las cuales permiten que las empresas trabajen en distintas plataformas y entornos con facilidad, desde el centro de datos principal hasta el extremo de la red.
Seleccionar idioma
Red Hat legal and privacy links
- Acerca de Red Hat
- Oportunidades de empleo
- Eventos
- Sedes
- Póngase en contacto con Red Hat
- Blog de Red Hat
- Diversidad, igualdad e inclusión
- Cool Stuff Store
- Red Hat Summit