Dovecot, an open-source and free mail server focused on security, comes installed on most Linux distros, but it is simple to install with yum
:
$ yum install -y dovecot
Once the installation is complete, you can enable the service and start it with systemctl
:
$ systemctl enable dovecot
$ systemctl start dovecot
Now we can work on configuring the service. Just like Postfix, there are lots of different configuration options. We will cover a few crucial options as well as ones that I personally encountered when troubleshooting and maintaining services.
Configuring Dovecot
The main configuration file is located at /etc/dovecot/dovecot.conf
. There are three Dovecot configuration options we will cover: listen
, protocols
, and mail_location
.
listen
The listen
configuration option sets the IP addresses where you want the service to listen. Usually, you use an asterisk (*
) here as your value, which is a wildcard meaning all IPv4 addresses. For IPv6 addresses, you would use a double colon (::
). Here's how to add both:
listen = *, ::
protocols
The protocols
configuration option allows you to specify which protocols you would like to support, such as IMAP and POP3. Usually, LMTP is listed here as well, which stands for the Local Mail Transfer Protocol:
protocols = imap, pop3, lmtp
mail_location
The mail_location
configuration option sets where the mail is picked up from. By default, this setting is empty, which means that Dovecot attempts to locate your mail automatically. The format of the mailbox location specification option is as follows:
mailbox-format : <path> [ : key = <value> … ]
Securing Dovecot
Dovecot can be secured just like any other service. It comes with self-signed SSL certificates in the file /etc/dovecot/conf.d/10-ssl.conf
. When connecting to the service for the first time, you will receive a warning message because they are self-signed and not CA certificates.
To complete the setup, you need to make sure that the ports are open in the firewall. Open the following ports for the service:
- 25 (default SMTP)
- 143 (default IMAP)
- 993 (SSL/TLS IMAP)
- 995 (SSL/TLS POP3)
With firewalld
, we can open these ports as follows:
$ firewall-cmd --permanent --add-port=110/tcp --add-port=995/tcp
$ firewall-cmd --permanent --add-port=143/tcp --add-port=993/tcp
$ firewall-cmd --reload
Troubleshooting Dovecot
If you are not sure why something is happening with the service, that’s when troubleshooting comes into play. Dovecot’s mail log is usually located in /var/log/dovecot.log
. (Checking the default mail log, /var/log/mail.log
, may not have enough details.) You can tail the mail logs actively with tail -f /var/log/dovecot.log
. Viewing the logs always provides a view into the server and service’s behavior.
One thing I learned as a system administrator is that the server logs will tell you what the server is trying to do based on how you have it set up. Based on that information, you can figure out what issue the service is having. Mailing issues can be a pain because delays can happen through middlemen that are not related to the server at all, and diagnosing these issues can take not just time, but a trained eye coming from experience.
Wrapping up
Learning where things are, the way to install services, how they function together, and how to identify problems in the logs can help in the long run when maintaining the environment. (And keeping the boss and customers happy.)
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.
Más similar
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