mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-25 07:42:13 +08:00
434 lines
14 KiB
XML
434 lines
14 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!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
|
|
"https://www.dovecot.org/releases/&dovecot-major;.&dovecot-minor;/dovecot-&dovecot-version;.tar.gz">
|
|
<!ENTITY dovecot-download-ftp " ">
|
|
<!ENTITY dovecot-md5sum "8961c3dafd845a25fd55e7903ffc3755">
|
|
<!ENTITY dovecot-size "7.5 MB">
|
|
<!ENTITY dovecot-buildsize "237 MB">
|
|
<!ENTITY dovecot-time "4.8 SBU">
|
|
]>
|
|
|
|
<sect1 id="dovecot" xreflabel="Dovecot-&dovecot-version;">
|
|
<?dbhtml filename="dovecot.html"?>
|
|
|
|
|
|
<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>
|
|
|
|
&lfs121_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">Additional Downloads</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Required patch:
|
|
<ulink url="&patch-root;/dovecot-&dovecot-version;-openssl3_fixes-1.patch"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Required patch:
|
|
<ulink url="&patch-root;/dovecot-&dovecot-version;-security_fix-1.patch"/>
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">Dovecot Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Required</bridgehead>
|
|
<para role="required">
|
|
<xref linkend="libtirpc"/>
|
|
</para>
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
<para role="optional">
|
|
<xref linkend="clucene"/>,
|
|
<xref linkend="icu"/>,
|
|
<xref linkend="libcap-pam"/>,
|
|
<xref linkend="linux-pam"/>,
|
|
<xref linkend="lua"/>,
|
|
<xref linkend="mariadb"/> or <ulink url="https://www.mysql.com/">MySQL</ulink>,
|
|
<xref linkend="openldap"/>,
|
|
<xref linkend="postgresql"/>,
|
|
<xref linkend="sqlite"/>,
|
|
<xref linkend="valgrind"/>,
|
|
<xref linkend="xfsprogs"/>,
|
|
<ulink url="https://cassandra.apache.org/">Cassandra</ulink>,
|
|
<ulink url="https://github.com/Cyan4973/lz4">lz4</ulink>,
|
|
<ulink url="https://github.com/shibukawa/snowball_py">stemmer</ulink> and
|
|
<ulink url="https://libsodium.gitbook.io/doc/">libsodium</ulink>
|
|
</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 &&
|
|
useradd -c "Dovecot unprivileged user" -d /dev/null -u 42 \
|
|
-g dovecot -s /bin/false dovecot &&
|
|
groupadd -g 43 dovenull &&
|
|
useradd -c "Dovecot login user" -d /dev/null -u 43 \
|
|
-g dovenull -s /bin/false dovenull</userinput></screen>
|
|
|
|
<para>
|
|
First, apply a patch to fix problems with OpenSSL-3:
|
|
</para>
|
|
|
|
<screen><userinput remap="pre">patch -Np1 -i ../dovecot-&dovecot-version;-openssl3_fixes-1.patch</userinput></screen>
|
|
|
|
<para>
|
|
Next, apply a patch to fix a security vulnerability:
|
|
</para>
|
|
|
|
<screen><userinput remap="pre">patch -Np1 -i ../dovecot-&dovecot-version;-security_fix-1.patch</userinput></screen>
|
|
|
|
<para>
|
|
Install <application>Dovecot</application> by running the following
|
|
commands:
|
|
</para>
|
|
|
|
<screen revision="sysv"><userinput>CPPFLAGS="-I/usr/include/tirpc" \
|
|
LDFLAGS+=" -ltirpc" \
|
|
./configure --prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--localstatedir=/var \
|
|
--with-systemd=no \
|
|
--docdir=/usr/share/doc/dovecot-&dovecot-version; \
|
|
--disable-static &&
|
|
make</userinput></screen>
|
|
|
|
<screen revision="systemd"><userinput>CPPFLAGS="-I/usr/include/tirpc" \
|
|
LDFLAGS+=" -ltirpc" \
|
|
./configure --prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--localstatedir=/var \
|
|
--docdir=/usr/share/doc/dovecot-&dovecot-version; \
|
|
--disable-static &&
|
|
make</userinput></screen>
|
|
|
|
<para>
|
|
To test the results, issue <command>make -k check</command>. <!-- An error
|
|
may be reported if <xref linkend="valgrind"/> is present when running
|
|
the test.-->
|
|
</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>
|
|
|
|
<para>
|
|
<command>CPPFLAGS=... LDFLAGS+=...</command>: build with libtirpc
|
|
instead of the recently removed RPC code provided by GlibC.
|
|
</para>
|
|
|
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
href="../../xincludes/static-libraries.xml"/>
|
|
|
|
<!-- With merged-/usr, /usr/lib/systemd/system is set by default.
|
|
<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> database support.
|
|
</para>
|
|
|
|
<para>
|
|
<option>--with-mysql</option>: This switch enables
|
|
<application>MySQL</application> database support.
|
|
</para>
|
|
|
|
<para>
|
|
<option>--with-sqlite</option>: This switch enables
|
|
<application>SQLite</application> database support.
|
|
</para>
|
|
|
|
<para>
|
|
<option>--with-lucene</option>: This switch enables
|
|
<application>CLucene</application> full text search support.
|
|
</para>
|
|
|
|
<para>
|
|
<option>--with-lua</option>: This switch enables
|
|
<application>Lua</application> plugin support. This includes
|
|
a mail and push notification plugin.
|
|
</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 &&
|
|
chmod -v 1777 /var/mail &&
|
|
cat > /etc/dovecot/local.conf << "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="https://wiki2.dovecot.org/"/> if you plan to use
|
|
<application>Dovecot</application> in a 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, dovecot-sysreport, and dsync (symbolic link)
|
|
</seg>
|
|
<seg>
|
|
various internal plugins in
|
|
<filename class="directory">/usr/lib/dovecot</filename>
|
|
</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="dovecot-sysreport">
|
|
<term><command>dovecot-sysreport</command></term>
|
|
<listitem>
|
|
<para>
|
|
prints system information that is useful to the Dovecot developers
|
|
when submitting bug reports upstream
|
|
</para>
|
|
<indexterm zone="dovecot dovecot-sysreport">
|
|
<primary sortas="b-dovecot-sysreport">dovecot-sysreport</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>
|