POP3 (Post Office Protocol 3) and IMAP (Internet Message Access Protocol) both are protocols works as message accessing agent. These protocols are used to the fetch email message from user inbox on mail servers. In simple words, POP3 and IMAP are responsible to fetch messages from mailboxes and show you on your mobile device or web interface. This tutorial will help you to install and configure Dovecot service on Debian 10 system.

Prerequisites

A running Debian 10 system Pre-configured mail server and user Mailboxes Shell access with root or sudo privileged account

Step 1 – Install Dovecot on Debian

Debian based systems have separate packages of Dovecot for IMAP and POP3 protocols. To install Dovecot server with the POP3 and IMAP functions support, run the following command: You can also install various Dovecot modules like, MySQL and PostgreSQL database support, mail filtering, full text search, spam filter training and ldap directory. To install additional modules run:

Step 2 – Dovecot Basic Settings

Once the installation finished, configure Dovecot server as per your requirements. Here is the quick and useful configuration of Dovecot to work on your system.

IMAP - 143 IMAPS - 993 POP3 - 110 POP3S - 995

To add the firewall rules, execute the following commands: Use the following commands to start/stop or restart Dovecot service: Use the below command to view the current status of the service

Step 4 - Test Mailbox Connection

To test this setup, I have created an account with name “rahul” on my Debian system. The mbox setting on Postfix server is configured to ~/Maildir directory. Next, you need mutt command line utility to connect mailbox using imaps protocol. Then connect to mailbox using below command: This will prompt to accept certificate (Press a for accept always). After that it will prompt for the password. Enter user password and press enter. You will see the emails of your account.

Step 5 - Adjust FirewallD Rules

For the systems running with firewalld need to allow following ports to allow access from network. Below is the list of port used by the POP3 and IMAP protocols: Then reload the changes.

Conclusion

In this tutorial, you have learned to install and configure Dovecot server on Debian 10 system. You have configured your server to access user mailbox via POP3 or IMAP protocols.

How to Install Dovecot  POP IMAP  on Debian 10   TecAdmin - 2