Introduction to Dovecot

Dovecot is an Internet Message Access Protocol (IMAP) and Post Office Protocol (POP) server, written primarily with security in mind. Dovecot aims to be lightweight, fast and easy to set up as well as highly configurable and easily extensible with plugins.

This package is known to build and work properly using an LFS-7.8 platform.

Package Information

  • Download (HTTP):

  • Download MD5 sum: 1e42eb3b69544c447ad882d7858f3630

  • Download size: 4.9 MB

  • Estimated disk space required: 257 MB (additional 14 MB for the tests)

  • Estimated build time: 1.3 SBU (additional 0.4 SBU for the tests)

Dovecot Dependencies


CLucene-, ICU-55.1, libcap-2.24 with PAM, Linux-PAM-1.2.1, MariaDB-10.0.21 or MySQL, MIT Kerberos V5-1.13.2 (for GSSAPI support), OpenLDAP-2.4.42, OpenSSL-1.0.2d, PostgreSQL-9.4.4, SQLite-, Valgrind-3.10.1, Cassandra, lz4, and stemmer

User Notes:

Installation of Dovecot

There should be dedicated users and groups for unprivileged Dovecot processes and for processing users' logins. Issue the following commands as the root user:

groupadd -g 42 dovecot &&
useradd -c "Dovecot unprivileged user" -d /dev/null -u 42 \
        -g dovecot -s /bin/false dovecot &&
groupadd -g 43 dovenull &&
useradd -c "Dovecot login user" -d /dev/null -u 43 \
        -g dovenull -s /bin/false dovenull

Install Dovecot by running the following commands:

./configure --prefix=/usr \
            --sysconfdir=/etc \
            --localstatedir=/var \
            --docdir=/usr/share/doc/dovecot-2.2.18 \
            --disable-static &&

To test the results, issue make -k check. One test fails for unknown reason

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--with-ldap: This switch enables OpenLDAP authentication support.

--with-pgsql: This switch enables PostgreSQL authentication support.

--with-mysql: This switch enables MySQL authentication support.

--with-sqlite: This switch enables SQLite authentication support.

--with-lucene: This switch enables CLucene full text search support.

--with-krb5: This switch enables GSSAPI authentication support.

Configuring Dovecot

Config Files

/etc/dovecot/dovecot.conf, /etc/dovecot/conf.d/*, and /etc/dovecot/local.conf

Configuration Information

Copy an example configuration, which you can use as a starting point:

cp -rv /usr/share/doc/dovecot-2.2.18/example-config/* /etc/dovecot

The following configuration is a simple proof of concept with IMAP service using local users for authentication and mailbox location. Reading files from the conf.d directory is commented out since the included example configuration requires OpenSSL and Linux PAM.

sed -i '/^\!include / s/^/#/' /etc/dovecot/dovecot.conf &&
chmod -v 1777 /var/mail &&
cat > /etc/dovecot/local.conf << "EOF"
protocols = imap
ssl = no
# The next line is only needed if you have no IPv6 network interfaces
listen = *
mail_location = mbox:~/Mail:INBOX=/var/mail/%u
userdb {
  driver = passwd
passdb {
  driver = shadow

You will definitely want to read the official documentation at if you plan to use Dovecot in production environment.

Boot Script

If you want the Dovecot server to start automatically when the system is booted, install the /etc/rc.d/init.d/dovecot init script included in the blfs-bootscripts-20150924 package.

make install-dovecot


Installed Programs: doveadm, doveconf, dovecot, dsync, and various internal programs
Installed Libraries: various internal plugins
Installed Directories: /etc/dovecot, /usr/{include,lib,libexec,share}/dovecot and /usr/share/doc/dovecot-2.2.18

Short Descriptions


is the Dovecot administration tool.


is Dovecot's configuration dumping utility.


is the IMAP and POP server.


is Dovecot's mailbox synchronization utility.

Last updated on 2015-09-21 11:19:34 -0700