Dovecot Installation

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Custom Dovecot v1.0.15 Docker Image

https://github.com/ovidiuf/image-dovecot

Dovecot v1.0.15 Installation

Build the oldest version with the hope that it can handle old storage structure. Downloaded the source code from https://www.dovecot.org/releases/1.0/dovecot-1.0.15.tar.gz and built it following the instructions:

./configure --enable-static
make

Installation steps:

  • Unzip dovecot.zip in /opt
chown 1205:1205 /opt/dovecot
  • Create user/group dovecot/dovecot 1205/1205 with home in /opt/dovecot
groupadd -g 1205 dovecot
useradd -m -d /opt/dovecot/home/dovecot -g 1205 -u 1205 dovecot
su - dovecot
mkdir -p /opt/dovecot/home/dovecot
  • The uid/gid/password of the main (and only) IMAP user are built into conf/passwd and conf/userdb, and they're also referred from the conf file (first_valid_uid/last_valid_uid). No OS-level user needs to be created, just we need to make sure there's no uid/gid conflict.
  • Update /opt/dovecot/conf/userdb with the user's home. As root:
mkdir -p /opt/dovecot/home/ovidiu
chown -R 58285:58285 /opt/dovecot/home/ovidiu

then update /opt/dovecot/conf/userdb.

  • Start/stop:
cd /opt/dovecot
./start-dovecot|./stop-dovecot
  • Restore Maildir, link it from /opt/dovecot/home/ovidiu and
chown -R 58285:58285 /opt/dovecot/home/ovidiu/Maildir

Building Latest Dovecot from Source

Requires openssl-devel package to be installed.

git clone https://github.com/dovecot/core.git dovecot
cd dovecot

Identify the latest release tag and check it out into a detached HEAD:

git checkout 2.2.33
./autogen.sh

I had to run autogen twice, the first time it complained about an 'AM_ICONV' macro.

PANDOC=false ./configure --enable-maintainer-mode

Output:

Install prefix . : /usr/local
File offsets ... : 64bit
I/O polling .... : epoll
I/O notifys .... : inotify
SSL ............ : yes (OpenSSL)
GSSAPI ......... : no
passdbs ........ : static passwd passwd-file shadow checkpassword
dcrypt ..........: yes
                 : -pam -bsdauth -sia -ldap -sql -vpopmail
userdbs ........ : static prefetch passwd passwd-file checkpassword nss
                 : -ldap -sql -vpopmail
SQL drivers .... :
                 : -pgsql -mysql -sqlite -cassandra
Full text search : squat
                 : -lucene -solr
make
sudo make install

"install" does the following:

+ - 0755    2508248 /usr/local/bin/doveadm
+ - 0755     433976 /usr/local/bin/doveconf
+ l 0777          7 /usr/local/bin/dsync -> doveadm
+ d 0755         20 /usr/local/etc/dovecot
+ d 0755      20480 /usr/local/include/dovecot
+ d 0755       8192 /usr/local/lib/dovecot
+ d 0755       4096 /usr/local/libexec/dovecot
+ - 0755     316744 /usr/local/sbin/dovecot
+ d 0755         24 /usr/local/share/aclocal
+ - 0644       5854 /usr/local/share/aclocal/dovecot.m4
+ d 0755        179 /usr/local/share/doc/dovecot
+ d 0755         23 /usr/local/share/dovecot
+ d 0755       4096 /usr/local/share/man/man1
+ - 0644         22 /usr/local/share/man/man1/deliver.1
+ - 0644       9008 /usr/local/share/man/man1/doveadm-acl.1
+ - 0644       5309 /usr/local/share/man/man1/doveadm-altmove.1
+ - 0644       5801 /usr/local/share/man/man1/doveadm-auth.1
+ - 0644         23 /usr/local/share/man/man1/doveadm-backup.1
+ - 0644       5139 /usr/local/share/man/man1/doveadm-batch.1
+ - 0644         19 /usr/local/share/man/man1/doveadm-config.1
+ - 0644         24 /usr/local/share/man/man1/doveadm-copy.1
+ - 0644       5077 /usr/local/share/man/man1/doveadm-deduplicate.1
+ - 0644       9392 /usr/local/share/man/man1/doveadm-director.1
+ - 0644       3148 /usr/local/share/man/man1/doveadm-dump.1
+ - 0644       2272 /usr/local/share/man/man1/doveadm-exec.1
+ - 0644       5034 /usr/local/share/man/man1/doveadm-expunge.1
+ - 0644       7751 /usr/local/share/man/man1/doveadm-fetch.1
+ - 0644       5797 /usr/local/share/man/man1/doveadm-flags.1
+ - 0644       4302 /usr/local/share/man/man1/doveadm-force-resync.1
+ - 0644       3440 /usr/local/share/man/man1/doveadm-fs.1
+ - 0644       4684 /usr/local/share/man/man1/doveadm-fts.1
+ - 0644       1584 /usr/local/share/man/man1/doveadm-help.1
+ - 0644       6210 /usr/local/share/man/man1/doveadm-import.1
+ - 0644       5322 /usr/local/share/man/man1/doveadm-index.1
+ - 0644       3081 /usr/local/share/man/man1/doveadm-instance.1
+ - 0644       4530 /usr/local/share/man/man1/doveadm-kick.1
+ - 0644       3761 /usr/local/share/man/man1/doveadm-log.1
+ - 0644       4209 /usr/local/share/man/man1/doveadm-mailbox-cryptokey.1
+ - 0644      11524 /usr/local/share/man/man1/doveadm-mailbox.1
+ - 0644       4159 /usr/local/share/man/man1/doveadm-mount.1
+ - 0644       6726 /usr/local/share/man/man1/doveadm-move.1
+ - 0644       2526 /usr/local/share/man/man1/doveadm-penalty.1
+ - 0644       3574 /usr/local/share/man/man1/doveadm-proxy.1
+ - 0644       4278 /usr/local/share/man/man1/doveadm-purge.1
+ - 0644       5139 /usr/local/share/man/man1/doveadm-pw.1
+ - 0644       6072 /usr/local/share/man/man1/doveadm-quota.1
+ - 0644         18 /usr/local/share/man/man1/doveadm-reload.1
+ - 0644       4842 /usr/local/share/man/man1/doveadm-replicator.1
+ - 0644       6022 /usr/local/share/man/man1/doveadm-search.1
+ - 0644       1917 /usr/local/share/man/man1/doveadm-stats.1
+ - 0644         18 /usr/local/share/man/man1/doveadm-stop.1
+ - 0644      15883 /usr/local/share/man/man1/doveadm-sync.1
+ - 0644       4518 /usr/local/share/man/man1/doveadm-user.1
+ - 0644       4103 /usr/local/share/man/man1/doveadm-who.1
+ - 0644       8119 /usr/local/share/man/man1/doveadm.1
+ - 0644       5304 /usr/local/share/man/man1/doveconf.1
+ - 0644       4915 /usr/local/share/man/man1/dovecot-lda.1
+ - 0644       4367 /usr/local/share/man/man1/dovecot.1
+ - 0644         23 /usr/local/share/man/man1/dsync.1
+ d 0755         36 /usr/local/share/man/man7
+ - 0644       9460 /usr/local/share/man/man7/doveadm-search-query.7