[8a8b05e] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY dovecot-download-http
|
---|
[201e34f] | 8 | "https://www.dovecot.org/releases/&dovecot-major;.&dovecot-minor;/dovecot-&dovecot-version;.tar.gz">
|
---|
[8a8b05e] | 9 | <!ENTITY dovecot-download-ftp " ">
|
---|
[562bc79] | 10 | <!ENTITY dovecot-md5sum "fbbf4e94ccfd94d910c1ff14c9330f57">
|
---|
[5c0c700] | 11 | <!ENTITY dovecot-size "6.9 MB">
|
---|
[9cab13a] | 12 | <!ENTITY dovecot-buildsize "181 MB">
|
---|
[71f567d] | 13 | <!ENTITY dovecot-time "3.9 SBU">
|
---|
[8a8b05e] | 14 | ]>
|
---|
| 15 |
|
---|
| 16 | <sect1 id="dovecot" xreflabel="Dovecot-&dovecot-version;">
|
---|
| 17 | <?dbhtml filename="dovecot.html"?>
|
---|
| 18 |
|
---|
| 19 | <sect1info>
|
---|
| 20 | <othername>$LastChangedBy$</othername>
|
---|
| 21 | <date>$Date$</date>
|
---|
| 22 | </sect1info>
|
---|
| 23 |
|
---|
| 24 | <title>Dovecot-&dovecot-version;</title>
|
---|
| 25 |
|
---|
| 26 | <indexterm zone="dovecot">
|
---|
| 27 | <primary sortas="a-Dovecot">Dovecot</primary>
|
---|
| 28 | </indexterm>
|
---|
| 29 |
|
---|
| 30 | <sect2 role="package">
|
---|
| 31 | <title>Introduction to Dovecot</title>
|
---|
| 32 |
|
---|
| 33 | <para>
|
---|
| 34 | <application>Dovecot</application> is an Internet Message Access Protocol
|
---|
| 35 | (IMAP) and Post Office Protocol (POP) server, written primarily with
|
---|
| 36 | security in mind. <application>Dovecot</application> aims to be
|
---|
| 37 | lightweight, fast and easy to set up as well as highly configurable and
|
---|
| 38 | easily extensible with plugins.
|
---|
| 39 | </para>
|
---|
| 40 |
|
---|
[63fc64e] | 41 | &lfs91_checked;
|
---|
[8a8b05e] | 42 |
|
---|
| 43 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 44 | <itemizedlist spacing="compact">
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>
|
---|
| 47 | Download (HTTP): <ulink url="&dovecot-download-http;"/>
|
---|
| 48 | </para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>
|
---|
| 52 | Download (FTP): <ulink url="&dovecot-download-ftp;"/>
|
---|
| 53 | </para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>
|
---|
| 57 | Download MD5 sum: &dovecot-md5sum;
|
---|
| 58 | </para>
|
---|
| 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>
|
---|
| 62 | Download size: &dovecot-size;
|
---|
| 63 | </para>
|
---|
| 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
| 66 | <para>
|
---|
| 67 | Estimated disk space required: &dovecot-buildsize;
|
---|
| 68 | </para>
|
---|
| 69 | </listitem>
|
---|
| 70 | <listitem>
|
---|
| 71 | <para>
|
---|
| 72 | Estimated build time: &dovecot-time;
|
---|
| 73 | </para>
|
---|
| 74 | </listitem>
|
---|
| 75 | </itemizedlist>
|
---|
[2c5dfc2d] | 76 |
|
---|
[8a8b05e] | 77 | <bridgehead renderas="sect3">Dovecot Dependencies</bridgehead>
|
---|
| 78 |
|
---|
[904c9b2] | 79 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 80 | <para role="required">
|
---|
| 81 | <xref linkend="libtirpc"/>
|
---|
| 82 | </para>
|
---|
| 83 |
|
---|
[8a8b05e] | 84 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 85 | <para role="optional">
|
---|
[3acd0b1] | 86 | <xref linkend="clucene"/>,
|
---|
[f9f13ae] | 87 | <xref linkend="icu"/>,
|
---|
[56605b9] | 88 | <xref linkend="libcap-pam"/>,
|
---|
[8a8b05e] | 89 | <xref linkend="linux-pam"/>,
|
---|
[5ff2b55] | 90 | <xref linkend="lua"/>,
|
---|
[3acd0b1] | 91 | <xref linkend="mariadb"/> or <ulink url="http://www.mysql.com/">MySQL</ulink>,
|
---|
[8a8b05e] | 92 | <xref linkend="openldap"/>,
|
---|
| 93 | <xref linkend="postgresql"/>,
|
---|
[f9f13ae] | 94 | <xref linkend="sqlite"/>,
|
---|
| 95 | <xref linkend="valgrind"/>,
|
---|
[194a584] | 96 | <xref linkend="xfsprogs"/>,
|
---|
[f9f13ae] | 97 | <ulink url="https://cassandra.apache.org/">Cassandra</ulink>,
|
---|
[5c0c700] | 98 | <ulink url="https://github.com/Cyan4973/lz4">lz4</ulink>,
|
---|
| 99 | <ulink url="https://github.com/shibukawa/snowball_py">stemmer</ulink> and
|
---|
| 100 | <ulink url="https://libsodium.gitbook.io/doc/">libsodium</ulink>
|
---|
[8a8b05e] | 101 | </para>
|
---|
| 102 |
|
---|
| 103 | <para condition="html" role="usernotes">User Notes:
|
---|
| 104 | <ulink url="&blfs-wiki;/dovecot"/>
|
---|
| 105 | </para>
|
---|
| 106 | </sect2>
|
---|
| 107 |
|
---|
| 108 | <sect2 role="installation">
|
---|
| 109 | <title>Installation of Dovecot</title>
|
---|
| 110 |
|
---|
| 111 | <para>
|
---|
| 112 | There should be dedicated users and groups for unprivileged Dovecot
|
---|
| 113 | processes and for processing users' logins. Issue the following commands
|
---|
| 114 | as the <systemitem class="username">root</systemitem> user:
|
---|
| 115 | </para>
|
---|
| 116 |
|
---|
| 117 | <screen role="root"><userinput>groupadd -g 42 dovecot &&
|
---|
| 118 | useradd -c "Dovecot unprivileged user" -d /dev/null -u 42 \
|
---|
| 119 | -g dovecot -s /bin/false dovecot &&
|
---|
| 120 | groupadd -g 43 dovenull &&
|
---|
| 121 | useradd -c "Dovecot login user" -d /dev/null -u 43 \
|
---|
| 122 | -g dovenull -s /bin/false dovenull</userinput></screen>
|
---|
| 123 |
|
---|
[2cd4158] | 124 | <para>
|
---|
| 125 | First, fix an issue causing a segfault in the test suite by
|
---|
| 126 | applying a sed:
|
---|
| 127 | </para>
|
---|
| 128 |
|
---|
| 129 | <screen><userinput>sed -e "s;#include <unistd.h>;&\n#include <crypt.h>;" \
|
---|
| 130 | -i src/auth/mycrypt.c</userinput></screen>
|
---|
| 131 |
|
---|
[8a8b05e] | 132 | <para>
|
---|
| 133 | Install <application>Dovecot</application> by running the following
|
---|
| 134 | commands:
|
---|
| 135 | </para>
|
---|
| 136 |
|
---|
[2cd4158] | 137 | <screen revision="sysv"><userinput>CFLAGS+=" -I/usr/include/tirpc" \
|
---|
| 138 | LDFLAGS+=" -ltirpc" \
|
---|
[6c1d0776] | 139 | ./configure --prefix=/usr \
|
---|
[1258125] | 140 | --sysconfdir=/etc \
|
---|
| 141 | --localstatedir=/var \
|
---|
[8a8b05e] | 142 | --docdir=/usr/share/doc/dovecot-&dovecot-version; \
|
---|
| 143 | --disable-static &&
|
---|
| 144 | make</userinput></screen>
|
---|
| 145 |
|
---|
[2cd4158] | 146 | <screen revision="systemd"><userinput>CFLAGS+=" -I/usr/include/tirpc" \
|
---|
| 147 | LDFLAGS+=" -ltirpc" \
|
---|
[6c1d0776] | 148 | ./configure --prefix=/usr \
|
---|
[1258125] | 149 | --sysconfdir=/etc \
|
---|
| 150 | --localstatedir=/var \
|
---|
| 151 | --docdir=/usr/share/doc/dovecot-&dovecot-version; \
|
---|
| 152 | --disable-static \
|
---|
| 153 | --with-systemdsystemunitdir=/lib/systemd/system &&
|
---|
| 154 | make</userinput></screen>
|
---|
| 155 |
|
---|
[201e34f] | 156 | <para>
|
---|
[194a584] | 157 | To test the results, issue <command>make -k check</command>. <!-- An error
|
---|
[ba54f50] | 158 | may be reported if <xref linkend="valgrind"/> is present when running
|
---|
[194a584] | 159 | the test.-->
|
---|
[ba54f50] | 160 | </para>
|
---|
[8a8b05e] | 161 |
|
---|
| 162 | <para>
|
---|
| 163 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 164 | </para>
|
---|
| 165 |
|
---|
| 166 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 167 |
|
---|
| 168 | </sect2>
|
---|
| 169 |
|
---|
| 170 | <sect2 role="commands">
|
---|
| 171 | <title>Command Explanations</title>
|
---|
| 172 |
|
---|
[6c1d0776] | 173 | <para><command>CFLAGS+=...LDFLAGS+=...</command>: build with libtirpc
|
---|
| 174 | instead of the recently removed RPC code provided by GlibC.</para>
|
---|
| 175 |
|
---|
[8a8b05e] | 176 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 177 | href="../../xincludes/static-libraries.xml"/>
|
---|
| 178 |
|
---|
[f7841987] | 179 | <para revision="systemd">
|
---|
[1258125] | 180 | <parameter>--with-systemdsystemunitdir=/lib/systemd/system</parameter>:
|
---|
| 181 | This switch is used to set the correct installation directory for
|
---|
| 182 | systemd units.
|
---|
| 183 | </para>
|
---|
| 184 |
|
---|
[8a8b05e] | 185 | <para>
|
---|
| 186 | <option>--with-ldap</option>: This switch enables
|
---|
| 187 | <application>OpenLDAP</application> authentication support.
|
---|
| 188 | </para>
|
---|
[2d9f558] | 189 |
|
---|
[8a8b05e] | 190 | <para>
|
---|
| 191 | <option>--with-pgsql</option>: This switch enables
|
---|
| 192 | <application>PostgreSQL</application> authentication support.
|
---|
| 193 | </para>
|
---|
[2d9f558] | 194 |
|
---|
[8a8b05e] | 195 | <para>
|
---|
| 196 | <option>--with-mysql</option>: This switch enables
|
---|
| 197 | <application>MySQL</application> authentication support.
|
---|
| 198 | </para>
|
---|
[2d9f558] | 199 |
|
---|
[8a8b05e] | 200 | <para>
|
---|
| 201 | <option>--with-sqlite</option>: This switch enables
|
---|
| 202 | <application>SQLite</application> authentication support.
|
---|
| 203 | </para>
|
---|
[2d9f558] | 204 |
|
---|
[8a8b05e] | 205 | <para>
|
---|
| 206 | <option>--with-lucene</option>: This switch enables
|
---|
| 207 | <application>CLucene</application> full text search support.
|
---|
| 208 | </para>
|
---|
[71f567d] | 209 | <!--
|
---|
[2d9f558] | 210 | <para>
|
---|
[71f567d] | 211 | <option>- -with-krb5</option>: This switch enables
|
---|
[2d9f558] | 212 | GSSAPI authentication support.
|
---|
| 213 | </para>
|
---|
[71f567d] | 214 | -->
|
---|
[8a8b05e] | 215 | </sect2>
|
---|
| 216 |
|
---|
| 217 | <sect2 role="configuration">
|
---|
| 218 | <title>Configuring Dovecot</title>
|
---|
| 219 |
|
---|
| 220 | <sect3 id="dovecot-config">
|
---|
| 221 | <title>Config Files</title>
|
---|
| 222 |
|
---|
| 223 | <para>
|
---|
| 224 | <filename>/etc/dovecot/dovecot.conf</filename>,
|
---|
| 225 | <filename>/etc/dovecot/conf.d/*</filename>, and
|
---|
| 226 | <filename>/etc/dovecot/local.conf</filename>
|
---|
| 227 | </para>
|
---|
| 228 |
|
---|
| 229 | <indexterm zone="dovecot dovecot-config">
|
---|
| 230 | <primary sortas="e-etc-dovecot-dovecot.conf">/etc/dovecot/dovecot.conf</primary>
|
---|
| 231 | </indexterm>
|
---|
| 232 | <indexterm zone="dovecot dovecot-config">
|
---|
| 233 | <primary sortas="e-etc-dovecot-conf.d">/etc/dovecot/conf.d/*</primary>
|
---|
| 234 | </indexterm>
|
---|
| 235 | <indexterm zone="dovecot dovecot-config">
|
---|
| 236 | <primary sortas="e-etc-dovecot-local.conf">/etc/dovecot/local.conf</primary>
|
---|
| 237 | </indexterm>
|
---|
| 238 |
|
---|
| 239 | </sect3>
|
---|
| 240 |
|
---|
| 241 | <sect3>
|
---|
| 242 | <title>Configuration Information</title>
|
---|
| 243 |
|
---|
| 244 | <para>
|
---|
| 245 | Copy an example configuration, which you can use as a starting point:
|
---|
| 246 | </para>
|
---|
| 247 |
|
---|
| 248 | <screen role="root"><userinput>cp -rv /usr/share/doc/dovecot-&dovecot-version;/example-config/* /etc/dovecot</userinput></screen>
|
---|
| 249 |
|
---|
| 250 | <para>
|
---|
| 251 | The following configuration is a simple proof of concept with IMAP
|
---|
| 252 | service using local users for authentication and mailbox location.
|
---|
| 253 | Reading files from the <filename class="directory">conf.d</filename>
|
---|
| 254 | directory is commented out since the included example configuration
|
---|
| 255 | requires <application>OpenSSL</application> and
|
---|
| 256 | <application>Linux PAM</application>.
|
---|
| 257 | </para>
|
---|
| 258 |
|
---|
| 259 | <screen role="root"><userinput>sed -i '/^\!include / s/^/#/' /etc/dovecot/dovecot.conf &&
|
---|
| 260 | chmod -v 1777 /var/mail &&
|
---|
| 261 | cat > /etc/dovecot/local.conf << "EOF"
|
---|
| 262 | <literal>protocols = imap
|
---|
| 263 | ssl = no
|
---|
[2d9f558] | 264 | # The next line is only needed if you have no IPv6 network interfaces
|
---|
| 265 | listen = *
|
---|
[8a8b05e] | 266 | mail_location = mbox:~/Mail:INBOX=/var/mail/%u
|
---|
| 267 | userdb {
|
---|
| 268 | driver = passwd
|
---|
| 269 | }
|
---|
| 270 | passdb {
|
---|
| 271 | driver = shadow
|
---|
| 272 | }</literal>
|
---|
| 273 | EOF</userinput></screen>
|
---|
| 274 |
|
---|
| 275 | <para>
|
---|
| 276 | You will definitely want to read the official documentation at <ulink
|
---|
| 277 | url="http://wiki2.dovecot.org/"/> if you plan to use
|
---|
| 278 | <application>Dovecot</application> in production environment.
|
---|
| 279 | </para>
|
---|
| 280 |
|
---|
| 281 | </sect3>
|
---|
| 282 |
|
---|
| 283 | <sect3 id="dovecot-init">
|
---|
[1258125] | 284 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 285 | <phrase revision="systemd">Systemd Unit</phrase></title>
|
---|
[8a8b05e] | 286 |
|
---|
[1258125] | 287 | <para revision="sysv">If you want the <application>Dovecot</application>
|
---|
| 288 | server to start automatically when the system is booted, install the
|
---|
| 289 | <filename>/etc/rc.d/init.d/dovecot</filename> init script included in the
|
---|
| 290 | <xref linkend="bootscripts"/> package.</para>
|
---|
| 291 |
|
---|
| 292 | <para revision="systemd">To start the <command>dovecot</command>
|
---|
| 293 | daemon at boot, enable the previously installed systemd unit with the
|
---|
| 294 | following command:</para>
|
---|
[8a8b05e] | 295 |
|
---|
| 296 | <indexterm zone="dovecot dovecot-init">
|
---|
| 297 | <primary sortas="f-dovecot">dovecot</primary>
|
---|
| 298 | </indexterm>
|
---|
| 299 |
|
---|
[1258125] | 300 | <screen role="root" revision="sysv"><userinput>make install-dovecot</userinput></screen>
|
---|
| 301 |
|
---|
| 302 | <screen role="root" revision="systemd"><userinput>systemctl enable dovecot</userinput></screen>
|
---|
[8a8b05e] | 303 |
|
---|
| 304 | </sect3>
|
---|
| 305 |
|
---|
| 306 | </sect2>
|
---|
| 307 |
|
---|
| 308 | <sect2 role="content">
|
---|
| 309 | <title>Contents</title>
|
---|
| 310 |
|
---|
| 311 | <segmentedlist>
|
---|
| 312 | <segtitle>Installed Programs</segtitle>
|
---|
| 313 | <segtitle>Installed Libraries</segtitle>
|
---|
| 314 | <segtitle>Installed Directories</segtitle>
|
---|
| 315 |
|
---|
| 316 | <seglistitem>
|
---|
| 317 | <seg>
|
---|
[a08727f] | 318 | doveadm, doveconf, dovecot, and dsync (symbolic link)
|
---|
[8a8b05e] | 319 | </seg>
|
---|
| 320 | <seg>
|
---|
[a08727f] | 321 | various internal plugins in <filename
|
---|
| 322 | class="directory">/usr/lib/dovecot</filename>
|
---|
[8a8b05e] | 323 | </seg>
|
---|
| 324 | <seg>
|
---|
| 325 | /etc/dovecot,
|
---|
[f9f13ae] | 326 | /usr/{include,lib,libexec,share}/dovecot and
|
---|
[8a8b05e] | 327 | /usr/share/doc/dovecot-&dovecot-version;
|
---|
| 328 | </seg>
|
---|
| 329 | </seglistitem>
|
---|
| 330 | </segmentedlist>
|
---|
| 331 |
|
---|
| 332 | <variablelist>
|
---|
| 333 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 334 | <?dbfo list-presentation="list"?>
|
---|
| 335 | <?dbhtml list-presentation="table"?>
|
---|
| 336 |
|
---|
| 337 | <varlistentry id="doveadm">
|
---|
| 338 | <term><command>doveadm</command></term>
|
---|
| 339 | <listitem>
|
---|
| 340 | <para>
|
---|
| 341 | is the <application>Dovecot</application> administration tool.
|
---|
| 342 | </para>
|
---|
| 343 | <indexterm zone="dovecot doveadm">
|
---|
| 344 | <primary sortas="b-doveadm">doveadm</primary>
|
---|
| 345 | </indexterm>
|
---|
| 346 | </listitem>
|
---|
| 347 | </varlistentry>
|
---|
| 348 |
|
---|
| 349 | <varlistentry id="doveconf">
|
---|
| 350 | <term><command>doveconf</command></term>
|
---|
| 351 | <listitem>
|
---|
| 352 | <para>
|
---|
| 353 | is <application>Dovecot</application>'s configuration dumping
|
---|
| 354 | utility.
|
---|
| 355 | </para>
|
---|
| 356 | <indexterm zone="dovecot doveconf">
|
---|
| 357 | <primary sortas="b-doveconf">doveconf</primary>
|
---|
| 358 | </indexterm>
|
---|
| 359 | </listitem>
|
---|
| 360 | </varlistentry>
|
---|
| 361 |
|
---|
| 362 | <varlistentry id="dovecot-prog">
|
---|
| 363 | <term><command>dovecot</command></term>
|
---|
| 364 | <listitem>
|
---|
| 365 | <para>
|
---|
| 366 | is the IMAP and POP server.
|
---|
| 367 | </para>
|
---|
| 368 | <indexterm zone="dovecot dovecot-prog">
|
---|
| 369 | <primary sortas="b-dovecot">dovecot</primary>
|
---|
| 370 | </indexterm>
|
---|
| 371 | </listitem>
|
---|
| 372 | </varlistentry>
|
---|
| 373 |
|
---|
| 374 | <varlistentry id="dsync">
|
---|
| 375 | <term><command>dsync</command></term>
|
---|
| 376 | <listitem>
|
---|
| 377 | <para>
|
---|
| 378 | is <application>Dovecot</application>'s mailbox synchronization
|
---|
| 379 | utility.
|
---|
| 380 | </para>
|
---|
| 381 | <indexterm zone="dovecot dsync">
|
---|
| 382 | <primary sortas="b-dsync">dsync</primary>
|
---|
| 383 | </indexterm>
|
---|
| 384 | </listitem>
|
---|
| 385 | </varlistentry>
|
---|
| 386 |
|
---|
| 387 |
|
---|
| 388 | </variablelist>
|
---|
| 389 |
|
---|
| 390 | </sect2>
|
---|
| 391 |
|
---|
| 392 | </sect1>
|
---|