view INSTALL @ 1577:b3ae1757f921 HEAD

~/rawlog -> ~/dovecot.rawlog
author Timo Sirainen <tss@iki.fi>
date Thu, 26 Jun 2003 01:42:55 +0300
parents 03dd87873a81
children a3de39b92838
line wrap: on
line source

Build Instructions
------------------

For most people, the usual:

  ./configure
  make
  sudo make install

is enough. This installs Dovecot under /usr/local. You must also rename the
configuration file to get it to work:

  mv /usr/local/etc/dovecot-example.conf /usr/local/etc/dovecot.conf

Read through it, make needed modifications and start dovecot binary.
doc/configuration.txt tells you more about configuring Dovecot.


SSL/TLS
-------

Dovecot supports both GNUTLS and OpenSSL. Dovecot prefers GNUTLS if it's
found, but fallbacks to OpenSSL. If you wish to force using OpenSSL, give
--with-ssl=openssl to configure.

For GNUTLS support you need version 0.5.5 or later. You can get GNUTLS from
http://www.gnutls.org/


Optional Configure Options
--------------------------

You can get a full list with:

  ./configure --help

The options are listed like --with-thing or --enable-thing, usually they're
also enabled by default. You can disable them with --without-thing or
--disable-thing.

Besides the standard options, Dovecot has added these:

  --enable-ipv6           Enable IPv6 support (default)

Enable IPv6 support. By default it's enabled if system is detected to
support it.

  --with-file-offset-size=BITS

Specifies if we use 32bit or 64bit file offsets. 64bit is default if system
supports it (Linux and Solaris does). You most likely won't have mails
larger than 2GB, so you may want to drop this to 32bit for a bit smaller
disk and memory usage.

  --with-mem-align=BYTES

Specifies memory alignment, needed with many non-x86 systems and should
speed up x86 systems too. Default is 8 with everyone to make sure 64bit
memory accessing work. Currently it should also be safe to set to 4 when
using 32bit file offets. With x86 it could be 1 as well if you want to save
a bit of disk space (in .imap.index.data file) and memory.

  --with-rawlog           Build support for logging user traffic

When Dovecot is compiled with this option and user's home directory
contains dovecot.rawlog directory, all IMAP connections are logged into
timstamp-pid.in and .out files. This is mostly useful for debugging.

  --enable-debug          Enable some extra checks for debugging

This is mostly useful for developers. It does quite a lot of unnecessary
work but should catch some programming mistakes more quickly.

  --with-ssl=gnutls|openssl Build with GNUTLS (default) or OpenSSL
  --with-ssldir=DIR       SSL base directory for certificates (/etc/ssl)

SSL options.

  --with-pop3d            Build POP3 server (default)

Build pop3d binary. It still has to be separately enabled from configuration
file.

  --with-passwd           Build with /etc/passwd support (default)
  --with-passwd-file      Build with passwd-like file support (default)
  --with-shadow           Build with shadow password support (default)
  --with-pam              Build with PAM support (default)
  --with-ldap             Build with LDAP support
  --with-vpopmail         Build with vpopmail support (default)
  --with-static-userdb    Build with static userdb support (default)
  --with-pgsql            Build with PostgreSQL support

Specify which authentication modules to use. Disabling them give you a few
bytes smaller binary, but not much else.


Dynamic Authentication Modules
------------------------------

Dovecot can also dynamically load authentication modules from
$prefix/lib/dovecot/auth/ directory. Binary packages builders should use
them for auth modules which require external libraries (eg. LDAP and
vpopmail). There's no standard way to build them as modules currently, but
something like this should work:

gcc -shared -fPIC -DHAVE_CONFIG_H -DUSERDB_LDAP -DPASSDB_LDAP \
-I../.. -I../lib -I../lib-settings \
db-ldap.c userdb-ldap.c passdb-ldap.c -o ldap.so \
../lib-settings/libsettings.a -lldap

gcc -shared -fPIC -DHAVE_CONFIG_H -DUSERDB_PGSQL -DPASSDB_PGSQL \
-I../.. -I../lib -I../lib-settings -I/usr/include/postgresql \
db-pgsql.c userdb-pgsql.c passdb-pgsql.c -o pgsql.so \
../lib-settings/libsettings.a -L/usr/lib/postgresql -lpq

gcc -shared -fPIC -DHAVE_CONFIG_H -DUSERDB_VPOPMAIL -DPASSDB_VPOPMAIL \
-I../.. -I../lib userdb-vpopmail.c passdb-vpopmail.c -o vpopmail.so \
-lvpopmail

Including libsettings.a in ldap.so and pgsql.so is kind of annoying, but it's
not needed elsewhere in dovecot-auth.

Dynamic IMAP and POP3 Modules
-----------------------------

If imap_use_modules or pop3_use_modules is set to yes, Dovecot will load all
*.so modules from directory pointed by imap_modules or pop3_modules. These
modules can do anything, they're only expected to contain <module name>_init
and <module name>_deinit functions which are called.