Installing and setting up Dovecot in RHEL 4 or CentOS 4 is easy. All we have to do is to enable the services we would like to provide and we are good to go.

Install Dovecot

Package Management1. If you did not add dovecot during the CentOS installation, you can add it now. Dovecot is located in the package Mail Server. Learn how to add or remove applications here.

Configure Dovecot

File Browser1. Click Applications then click File Browser. This will launch the File Browser window.
File Browser2. In the Location field, type in /etc and press Enter.
Edit dovecot.cf3. Double click on the file dovecot.conf to open it for editing. We need to change a few key items.
Find the following keys and change its values as follows
protocols = pop3 pop3s imap imaps
default_mail_env = maildir:~/Maildir/
client_workarounds = oe6-fetch-no-newmail outlook-idle outlook-pop3-no-nuls
Lines starting with # are comments. The last line enables workarounds for various Microsoft Outlook/Outlook Express bugs. Save the file after completing your changes.
Service Configuration4. Start the dovecot service. Learn how to start and stop services here.

Test Dovecot

Terminal1. Click Applications, select System Tools, and click Terminal. This will launch the Terminal window.
Terminal2. In the Terminal window, type in the highlighted commands below.

Sample dovecot session. Replace johndoe and password with any valid user name and password.

[root@mail ~]# telnet localhost pop3
+OK dovecot ready.
user johndoe
pass password
+OK Logged in.
+OK 1 messages:
1 622
retr 1
+OK 622 octets
Return-Path: <johndoe@mail.acme.local>
X-Original-To: johndoe
Delivered-To: johndoe@mail.acme.local
Received: from localhost.localdomain (localhost.localdomain [])
        by mail.acme.local (Postfix) with SMTP id 9729067C17
        for <johndoe>; Thu, 22 Feb 2007 09:06:37 -0500 (EST)
Message-Id: <20070222140640.9729067C17@mail.acme.local>
Date: Thu, 22 Feb 2007 09:06:37 -0500 (EST)
From: johndoe@mail.acme.local
To: undisclosed-recipients:;
X-IMAPbase: 1172153557 1
Status: O
X-UID: 1
Content-Length: 5

+OK Logging out.
Connection closed by foreign host.
[root@mail ~]#

NoteIf you encounter any problems, check the log file at /var/log/maillog.


Visit the forum to ask for help or to give a comment.

Posted on 3/12/2007 and last updated on 11/7/2009
Filed under CentOS 4 , Dovecot , Red Hat Enterprise Linux 4