= Dovecot = '''`dovecot(1)`''' is an [[Email/IMAP|IMAP]] and [[Email/POP|POP3]] [[Email/MUA|mail user agent]]. It also supports [[Email/LMTP|LMTP]]. <> ---- == Installation == Most [[Linux]] and [[BSD]] distributions offer a `dovecot` package. For systemd-capable systems, start and enable `dovecot.service`. For BSD distributions, try: {{{ service dovecot start }}} ---- == Configuration == `dovecot(1)` is primarily configured in `/etc/dovecot/dovecot.conf` (or `/usr/local/etc/dovecot/dovecot.conf` for [[BSD|BSDs]]). A basic configuration looks like: {{{ protocols = imap pop3 pop3_uidl_format = %g ssl = no disable_plaintext_auth = no log_path = /var/log/dovecot.log mail_location = maildir:~/Maildir auth_verbose = yes auth_mechanisms = plain passdb { driver = pam } userdb { driver = passwd args = blocking=no override_fields = uid=vmail gid=vmail } }}} For almost any configuration, it is necessary to have a `vmail` system user. {{{ sudo groupadd -g 5000 vmail sudo useradd -u 5000 -g vmail -s /usr/bin/nologin -d /var/vmail -m vmail sudo touch /var/log/dovecot.log sudo chown vmail:vmail /var/log/dovecot.log }}} To test a configuration file, try `dovecot -n`. === Default Folder === By default, `dovecot(1)` expects several folders to exist. This can propogate confusing error messages. `dovecot(1)` can be configured to automatically create them as needed. {{{ namespace inbox { mailbox Drafts { special_use = \Drafts auto = create } mailbox Junk { special_use = \Junk auto = create } mailbox Trash { special_use = \Trash auto = create } mailbox Sent { special_use = \Sent auto = create } } }}} === Encryption === {{{ ssl = yes disable_plaintext_auth = yes ssl_key =