How to Install Dovecot on Cent OS

Hi All,

Today We are going to see how to install Dovecot on Cent OS.

Now install Dovecot using the following command:

Once Dovecot is installed, edit the following file using your favorite editor.

and find the following lines:

Now Append the following lines, just below these lines:

Now open another configuration using the following command.

and find the following lines.

Append login at the end of the line auth_mechanisms = plain to make it look like

Again edit /etc/dovecot/conf.d/10-mail.conf file using your favorite editor.

Find the following lines

Now add the following line just below these lines:

Now edit /etc/dovecot/conf.d/20-pop3.conf using your favorite editor.

and find the following lines.

Uncomment the above line to make it look like as shown below.

Now restart postfix, and dovecot using the following command.

Now if you have a firewall running you will need to allow port number 25, 587, 465, 110, 143, 993, 995 and 80. All the ports except 80 are used to send and receive emails and port 80 is used to make HTTP connections. HTTP connections will be used to access Squirrelmail using web interface.

To unblock all these ports from firewall, run the following commands.

Testing Postfix and Dovecot

You can check if Postfix is working by executing the following command in your terminal.

If you do not have telnet installed, then you can run the following command to install telnet.

Once you are connected using telnet you will see following output.

Now you can also send email using telnet. Use the following command to enter the sender username.

To enter the email of recipient, you can use the use the following command.

To enter the body of email, enter the following command.

Once you have entered your message, enter dot (.) to finish the message. Finally enter quit to exit telnet.

To test Dovecot, enter the following command.

You will see following output,

It tells that Dovecot is working fine, you can login to your mail account by providing login command, then use pass command to enter your password. To view the mails in your account, use retr command.


Thanks for reading this tutorial 🙂



View all posts by

Leave a Reply

Your email address will not be published. Required fields are marked *