glfs/server/mail/dovecot.xml
Pierre Labastie f78419877e Another run of parameter vs option fixes
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@17877 af4574ff-66df-0310-9fd7-8a98e5e911e0
2016-10-12 12:23:02 +00:00

369 lines
12 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY dovecot-download-http
"http://www.dovecot.org/releases/&dovecot-major;.&dovecot-minor;/dovecot-&dovecot-version;.tar.gz">
<!ENTITY dovecot-download-ftp " ">
<!ENTITY dovecot-md5sum "8f62ea76489c47c369cbbe0b19818448">
<!ENTITY dovecot-size "5.3 MB">
<!ENTITY dovecot-buildsize "286 MB (with tests)">
<!ENTITY dovecot-time "2.1 SBU (with tests)">
]>
<sect1 id="dovecot" xreflabel="Dovecot-&dovecot-version;">
<?dbhtml filename="dovecot.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>Dovecot-&dovecot-version;</title>
<indexterm zone="dovecot">
<primary sortas="a-Dovecot">Dovecot</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Dovecot</title>
<para>
<application>Dovecot</application> is an Internet Message Access Protocol
(IMAP) and Post Office Protocol (POP) server, written primarily with
security in mind. <application>Dovecot</application> aims to be
lightweight, fast and easy to set up as well as highly configurable and
easily extensible with plugins.
</para>
&lfs7a_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&dovecot-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&dovecot-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &dovecot-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &dovecot-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &dovecot-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &dovecot-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Dovecot Dependencies</bridgehead>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="clucene"/>,
<xref linkend="icu"/>,
<xref linkend="libcap-pam"/>,
<xref linkend="linux-pam"/>,
<xref linkend="mariadb"/> or <ulink url="http://www.mysql.com/">MySQL</ulink>,
<xref linkend="mitkrb"/> (for GSSAPI support),
<xref linkend="openldap"/>,
<xref linkend="openssl"/>,
<xref linkend="postgresql"/>,
<xref linkend="sqlite"/>,
<xref linkend="valgrind"/>,
<ulink url="https://cassandra.apache.org/">Cassandra</ulink>,
<ulink url="https://github.com/Cyan4973/lz4">lz4</ulink>, and
<ulink url="https://github.com/shibukawa/snowball_py">stemmer</ulink>
</para>
<para condition="html" role="usernotes">User Notes:
<ulink url="&blfs-wiki;/dovecot"/>
</para>
</sect2>
<sect2 role="installation">
<title>Installation of Dovecot</title>
<para>
There should be dedicated users and groups for unprivileged Dovecot
processes and for processing users' logins. Issue the following commands
as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>groupadd -g 42 dovecot &amp;&amp;
useradd -c "Dovecot unprivileged user" -d /dev/null -u 42 \
-g dovecot -s /bin/false dovecot &amp;&amp;
groupadd -g 43 dovenull &amp;&amp;
useradd -c "Dovecot login user" -d /dev/null -u 43 \
-g dovenull -s /bin/false dovenull</userinput></screen>
<para>
Install <application>Dovecot</application> by running the following
commands:
</para>
<screen revision="sysv"><userinput>./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--docdir=/usr/share/doc/dovecot-&dovecot-version; \
--disable-static &amp;&amp;
make</userinput></screen>
<screen revision="systemd"><userinput>./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--docdir=/usr/share/doc/dovecot-&dovecot-version; \
--disable-static \
--with-systemdsystemunitdir=/lib/systemd/system &amp;&amp;
make</userinput></screen>
<para>To test the results, issue <command>make -k check</command>. One test
fails for unknown reason</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>make install</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../xincludes/static-libraries.xml"/>
<para revision="systemd">
<parameter>--with-systemdsystemunitdir=/lib/systemd/system</parameter>:
This switch is used to set the correct installation directory for
systemd units.
</para>
<para>
<option>--with-ldap</option>: This switch enables
<application>OpenLDAP</application> authentication support.
</para>
<para>
<option>--with-pgsql</option>: This switch enables
<application>PostgreSQL</application> authentication support.
</para>
<para>
<option>--with-mysql</option>: This switch enables
<application>MySQL</application> authentication support.
</para>
<para>
<option>--with-sqlite</option>: This switch enables
<application>SQLite</application> authentication support.
</para>
<para>
<option>--with-lucene</option>: This switch enables
<application>CLucene</application> full text search support.
</para>
<para>
<option>--with-krb5</option>: This switch enables
GSSAPI authentication support.
</para>
</sect2>
<sect2 role="configuration">
<title>Configuring Dovecot</title>
<sect3 id="dovecot-config">
<title>Config Files</title>
<para>
<filename>/etc/dovecot/dovecot.conf</filename>,
<filename>/etc/dovecot/conf.d/*</filename>, and
<filename>/etc/dovecot/local.conf</filename>
</para>
<indexterm zone="dovecot dovecot-config">
<primary sortas="e-etc-dovecot-dovecot.conf">/etc/dovecot/dovecot.conf</primary>
</indexterm>
<indexterm zone="dovecot dovecot-config">
<primary sortas="e-etc-dovecot-conf.d">/etc/dovecot/conf.d/*</primary>
</indexterm>
<indexterm zone="dovecot dovecot-config">
<primary sortas="e-etc-dovecot-local.conf">/etc/dovecot/local.conf</primary>
</indexterm>
</sect3>
<sect3>
<title>Configuration Information</title>
<para>
Copy an example configuration, which you can use as a starting point:
</para>
<screen role="root"><userinput>cp -rv /usr/share/doc/dovecot-&dovecot-version;/example-config/* /etc/dovecot</userinput></screen>
<para>
The following configuration is a simple proof of concept with IMAP
service using local users for authentication and mailbox location.
Reading files from the <filename class="directory">conf.d</filename>
directory is commented out since the included example configuration
requires <application>OpenSSL</application> and
<application>Linux PAM</application>.
</para>
<screen role="root"><userinput>sed -i '/^\!include / s/^/#/' /etc/dovecot/dovecot.conf &amp;&amp;
chmod -v 1777 /var/mail &amp;&amp;
cat &gt; /etc/dovecot/local.conf &lt;&lt; "EOF"
<literal>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
}</literal>
EOF</userinput></screen>
<para>
You will definitely want to read the official documentation at <ulink
url="http://wiki2.dovecot.org/"/> if you plan to use
<application>Dovecot</application> in production environment.
</para>
</sect3>
<sect3 id="dovecot-init">
<title><phrase revision="sysv">Boot Script</phrase>
<phrase revision="systemd">Systemd Unit</phrase></title>
<para revision="sysv">If you want the <application>Dovecot</application>
server to start automatically when the system is booted, install the
<filename>/etc/rc.d/init.d/dovecot</filename> init script included in the
<xref linkend="bootscripts"/> package.</para>
<para revision="systemd">To start the <command>dovecot</command>
daemon at boot, enable the previously installed systemd unit with the
following command:</para>
<indexterm zone="dovecot dovecot-init">
<primary sortas="f-dovecot">dovecot</primary>
</indexterm>
<screen role="root" revision="sysv"><userinput>make install-dovecot</userinput></screen>
<screen role="root" revision="systemd"><userinput>systemctl enable dovecot</userinput></screen>
</sect3>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
doveadm, doveconf, dovecot, dsync (symbolic link), and various
internal programs
</seg>
<seg>
various internal plugins
</seg>
<seg>
/etc/dovecot,
/usr/{include,lib,libexec,share}/dovecot and
/usr/share/doc/dovecot-&dovecot-version;
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="doveadm">
<term><command>doveadm</command></term>
<listitem>
<para>
is the <application>Dovecot</application> administration tool.
</para>
<indexterm zone="dovecot doveadm">
<primary sortas="b-doveadm">doveadm</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="doveconf">
<term><command>doveconf</command></term>
<listitem>
<para>
is <application>Dovecot</application>'s configuration dumping
utility.
</para>
<indexterm zone="dovecot doveconf">
<primary sortas="b-doveconf">doveconf</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="dovecot-prog">
<term><command>dovecot</command></term>
<listitem>
<para>
is the IMAP and POP server.
</para>
<indexterm zone="dovecot dovecot-prog">
<primary sortas="b-dovecot">dovecot</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="dsync">
<term><command>dsync</command></term>
<listitem>
<para>
is <application>Dovecot</application>'s mailbox synchronization
utility.
</para>
<indexterm zone="dovecot dsync">
<primary sortas="b-dsync">dsync</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>