Published: Thursday, Nov 28, 2013 Last modified: Monday, Aug 10, 2020

There is too much configuration. There is too much state. There are too many options. There are too many dot files. Stuff should just work.

— Rob Pike (@rob_pike) July 26, 2013

The most minimal Dovecot IMAP configuration I could find is:

log_path = /var/log/dovecot.log
ssl = no

passdb {
    driver = pam
}

userdb {
    driver = passwd
}

The default dovecot.sample sucks (>1000 SLOC!!) and so does http://wiki2.dovecot.org/QuickConfiguration.

You need log_path or you won’t be able to understand why dovecot fails to come up with dovecot.service: main process exited, code=exited, status=89/n/a typically seen via journalctl --full -f -u dovecot.

The Dovecot configuration format is a little painful. This won’t work:

    passdb { driver = pam }

Nor this:

    passdb {
    driver = pam }

Feel free to experiment yourself between sudo systemctl restart dovecot while tail -f /var/log/dovecot.log on a large screen.

In my Archlinux system, by default email sanely ends up in ~/Maildir via Postfix handing mail over to Dovecot’s Local Delivery Agent:

$ grep mailbox /etc/postfix/main.cf
mailbox_command = /usr/lib/dovecot/deliver

I could just not run the IMAP part I guess and use mutt -f ~/Maildir/.

When I use dovecot -n to get a canonical view of the configuration I get:

# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-0.bpo.4-amd64 x86_64
log_path = /var/log/dovecot.log
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
passdb {
  driver = pam
}
ssl = no
userdb {
  driver = passwd
}

That managesieve… stuff is injected from installing the separate pigeonhole package btw.

My Dovecot IMAP configuration goals are:

I want to see Dovecot succeed but there are a couple of obvious problems with it: