[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 " ">
|
---|
[963c713] | 10 | <!ENTITY dovecot-md5sum "437c961998e2e825d22288b7601b7c18">
|
---|
[2d4f7ec0] | 11 | <!ENTITY dovecot-size "6.7 MB">
|
---|
[963c713] | 12 | <!ENTITY dovecot-buildsize "171 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 |
|
---|
[169c9a9] | 41 | &lfs84_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>,
|
---|
| 98 | <ulink url="https://github.com/Cyan4973/lz4">lz4</ulink>, and
|
---|
| 99 | <ulink url="https://github.com/shibukawa/snowball_py">stemmer</ulink>
|
---|
[8a8b05e] | 100 | </para>
|
---|
| 101 |
|
---|
| 102 | <para condition="html" role="usernotes">User Notes:
|
---|
| 103 | <ulink url="&blfs-wiki;/dovecot"/>
|
---|
| 104 | </para>
|
---|
| 105 | </sect2>
|
---|
| 106 |
|
---|
| 107 | <sect2 role="installation">
|
---|
| 108 | <title>Installation of Dovecot</title>
|
---|
| 109 |
|
---|
| 110 | <para>
|
---|
| 111 | There should be dedicated users and groups for unprivileged Dovecot
|
---|
| 112 | processes and for processing users' logins. Issue the following commands
|
---|
| 113 | as the <systemitem class="username">root</systemitem> user:
|
---|
| 114 | </para>
|
---|
| 115 |
|
---|
| 116 | <screen role="root"><userinput>groupadd -g 42 dovecot &&
|
---|
| 117 | useradd -c "Dovecot unprivileged user" -d /dev/null -u 42 \
|
---|
| 118 | -g dovecot -s /bin/false dovecot &&
|
---|
| 119 | groupadd -g 43 dovenull &&
|
---|
| 120 | useradd -c "Dovecot login user" -d /dev/null -u 43 \
|
---|
| 121 | -g dovenull -s /bin/false dovenull</userinput></screen>
|
---|
| 122 |
|
---|
[2cd4158] | 123 | <para>
|
---|
| 124 | First, fix an issue causing a segfault in the test suite by
|
---|
| 125 | applying a sed:
|
---|
| 126 | </para>
|
---|
| 127 |
|
---|
| 128 | <screen><userinput>sed -e "s;#include <unistd.h>;&\n#include <crypt.h>;" \
|
---|
| 129 | -i src/auth/mycrypt.c</userinput></screen>
|
---|
| 130 |
|
---|
[8a8b05e] | 131 | <para>
|
---|
| 132 | Install <application>Dovecot</application> by running the following
|
---|
| 133 | commands:
|
---|
| 134 | </para>
|
---|
| 135 |
|
---|
[2cd4158] | 136 | <screen revision="sysv"><userinput>CFLAGS+=" -I/usr/include/tirpc" \
|
---|
| 137 | LDFLAGS+=" -ltirpc" \
|
---|
[6c1d0776] | 138 | ./configure --prefix=/usr \
|
---|
[1258125] | 139 | --sysconfdir=/etc \
|
---|
| 140 | --localstatedir=/var \
|
---|
[8a8b05e] | 141 | --docdir=/usr/share/doc/dovecot-&dovecot-version; \
|
---|
| 142 | --disable-static &&
|
---|
| 143 | make</userinput></screen>
|
---|
| 144 |
|
---|
[2cd4158] | 145 | <screen revision="systemd"><userinput>CFLAGS+=" -I/usr/include/tirpc" \
|
---|
| 146 | LDFLAGS+=" -ltirpc" \
|
---|
[6c1d0776] | 147 | ./configure --prefix=/usr \
|
---|
[1258125] | 148 | --sysconfdir=/etc \
|
---|
| 149 | --localstatedir=/var \
|
---|
| 150 | --docdir=/usr/share/doc/dovecot-&dovecot-version; \
|
---|
| 151 | --disable-static \
|
---|
| 152 | --with-systemdsystemunitdir=/lib/systemd/system &&
|
---|
| 153 | make</userinput></screen>
|
---|
| 154 |
|
---|
[201e34f] | 155 | <para>
|
---|
[194a584] | 156 | To test the results, issue <command>make -k check</command>. <!-- An error
|
---|
[ba54f50] | 157 | may be reported if <xref linkend="valgrind"/> is present when running
|
---|
[194a584] | 158 | the test.-->
|
---|
[ba54f50] | 159 | </para>
|
---|
[8a8b05e] | 160 |
|
---|
| 161 | <para>
|
---|
| 162 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 163 | </para>
|
---|
| 164 |
|
---|
| 165 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 166 |
|
---|
| 167 | </sect2>
|
---|
| 168 |
|
---|
| 169 | <sect2 role="commands">
|
---|
| 170 | <title>Command Explanations</title>
|
---|
| 171 |
|
---|
[6c1d0776] | 172 | <para><command>CFLAGS+=...LDFLAGS+=...</command>: build with libtirpc
|
---|
| 173 | instead of the recently removed RPC code provided by GlibC.</para>
|
---|
| 174 |
|
---|
[8a8b05e] | 175 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 176 | href="../../xincludes/static-libraries.xml"/>
|
---|
| 177 |
|
---|
[f7841987] | 178 | <para revision="systemd">
|
---|
[1258125] | 179 | <parameter>--with-systemdsystemunitdir=/lib/systemd/system</parameter>:
|
---|
| 180 | This switch is used to set the correct installation directory for
|
---|
| 181 | systemd units.
|
---|
| 182 | </para>
|
---|
| 183 |
|
---|
[8a8b05e] | 184 | <para>
|
---|
| 185 | <option>--with-ldap</option>: This switch enables
|
---|
| 186 | <application>OpenLDAP</application> authentication support.
|
---|
| 187 | </para>
|
---|
[2d9f558] | 188 |
|
---|
[8a8b05e] | 189 | <para>
|
---|
| 190 | <option>--with-pgsql</option>: This switch enables
|
---|
| 191 | <application>PostgreSQL</application> authentication support.
|
---|
| 192 | </para>
|
---|
[2d9f558] | 193 |
|
---|
[8a8b05e] | 194 | <para>
|
---|
| 195 | <option>--with-mysql</option>: This switch enables
|
---|
| 196 | <application>MySQL</application> authentication support.
|
---|
| 197 | </para>
|
---|
[2d9f558] | 198 |
|
---|
[8a8b05e] | 199 | <para>
|
---|
| 200 | <option>--with-sqlite</option>: This switch enables
|
---|
| 201 | <application>SQLite</application> authentication support.
|
---|
| 202 | </para>
|
---|
[2d9f558] | 203 |
|
---|
[8a8b05e] | 204 | <para>
|
---|
| 205 | <option>--with-lucene</option>: This switch enables
|
---|
| 206 | <application>CLucene</application> full text search support.
|
---|
| 207 | </para>
|
---|
[71f567d] | 208 | <!--
|
---|
[2d9f558] | 209 | <para>
|
---|
[71f567d] | 210 | <option>- -with-krb5</option>: This switch enables
|
---|
[2d9f558] | 211 | GSSAPI authentication support.
|
---|
| 212 | </para>
|
---|
[71f567d] | 213 | -->
|
---|
[8a8b05e] | 214 | </sect2>
|
---|
| 215 |
|
---|
| 216 | <sect2 role="configuration">
|
---|
| 217 | <title>Configuring Dovecot</title>
|
---|
| 218 |
|
---|
| 219 | <sect3 id="dovecot-config">
|
---|
| 220 | <title>Config Files</title>
|
---|
| 221 |
|
---|
| 222 | <para>
|
---|
| 223 | <filename>/etc/dovecot/dovecot.conf</filename>,
|
---|
| 224 | <filename>/etc/dovecot/conf.d/*</filename>, and
|
---|
| 225 | <filename>/etc/dovecot/local.conf</filename>
|
---|
| 226 | </para>
|
---|
| 227 |
|
---|
| 228 | <indexterm zone="dovecot dovecot-config">
|
---|
| 229 | <primary sortas="e-etc-dovecot-dovecot.conf">/etc/dovecot/dovecot.conf</primary>
|
---|
| 230 | </indexterm>
|
---|
| 231 | <indexterm zone="dovecot dovecot-config">
|
---|
| 232 | <primary sortas="e-etc-dovecot-conf.d">/etc/dovecot/conf.d/*</primary>
|
---|
| 233 | </indexterm>
|
---|
| 234 | <indexterm zone="dovecot dovecot-config">
|
---|
| 235 | <primary sortas="e-etc-dovecot-local.conf">/etc/dovecot/local.conf</primary>
|
---|
| 236 | </indexterm>
|
---|
| 237 |
|
---|
| 238 | </sect3>
|
---|
| 239 |
|
---|
| 240 | <sect3>
|
---|
| 241 | <title>Configuration Information</title>
|
---|
| 242 |
|
---|
| 243 | <para>
|
---|
| 244 | Copy an example configuration, which you can use as a starting point:
|
---|
| 245 | </para>
|
---|
| 246 |
|
---|
| 247 | <screen role="root"><userinput>cp -rv /usr/share/doc/dovecot-&dovecot-version;/example-config/* /etc/dovecot</userinput></screen>
|
---|
| 248 |
|
---|
| 249 | <para>
|
---|
| 250 | The following configuration is a simple proof of concept with IMAP
|
---|
| 251 | service using local users for authentication and mailbox location.
|
---|
| 252 | Reading files from the <filename class="directory">conf.d</filename>
|
---|
| 253 | directory is commented out since the included example configuration
|
---|
| 254 | requires <application>OpenSSL</application> and
|
---|
| 255 | <application>Linux PAM</application>.
|
---|
| 256 | </para>
|
---|
| 257 |
|
---|
| 258 | <screen role="root"><userinput>sed -i '/^\!include / s/^/#/' /etc/dovecot/dovecot.conf &&
|
---|
| 259 | chmod -v 1777 /var/mail &&
|
---|
| 260 | cat > /etc/dovecot/local.conf << "EOF"
|
---|
| 261 | <literal>protocols = imap
|
---|
| 262 | ssl = no
|
---|
[2d9f558] | 263 | # The next line is only needed if you have no IPv6 network interfaces
|
---|
| 264 | listen = *
|
---|
[8a8b05e] | 265 | mail_location = mbox:~/Mail:INBOX=/var/mail/%u
|
---|
| 266 | userdb {
|
---|
| 267 | driver = passwd
|
---|
| 268 | }
|
---|
| 269 | passdb {
|
---|
| 270 | driver = shadow
|
---|
| 271 | }</literal>
|
---|
| 272 | EOF</userinput></screen>
|
---|
| 273 |
|
---|
| 274 | <para>
|
---|
| 275 | You will definitely want to read the official documentation at <ulink
|
---|
| 276 | url="http://wiki2.dovecot.org/"/> if you plan to use
|
---|
| 277 | <application>Dovecot</application> in production environment.
|
---|
| 278 | </para>
|
---|
| 279 |
|
---|
| 280 | </sect3>
|
---|
| 281 |
|
---|
| 282 | <sect3 id="dovecot-init">
|
---|
[1258125] | 283 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 284 | <phrase revision="systemd">Systemd Unit</phrase></title>
|
---|
[8a8b05e] | 285 |
|
---|
[1258125] | 286 | <para revision="sysv">If you want the <application>Dovecot</application>
|
---|
| 287 | server to start automatically when the system is booted, install the
|
---|
| 288 | <filename>/etc/rc.d/init.d/dovecot</filename> init script included in the
|
---|
| 289 | <xref linkend="bootscripts"/> package.</para>
|
---|
| 290 |
|
---|
| 291 | <para revision="systemd">To start the <command>dovecot</command>
|
---|
| 292 | daemon at boot, enable the previously installed systemd unit with the
|
---|
| 293 | following command:</para>
|
---|
[8a8b05e] | 294 |
|
---|
| 295 | <indexterm zone="dovecot dovecot-init">
|
---|
| 296 | <primary sortas="f-dovecot">dovecot</primary>
|
---|
| 297 | </indexterm>
|
---|
| 298 |
|
---|
[1258125] | 299 | <screen role="root" revision="sysv"><userinput>make install-dovecot</userinput></screen>
|
---|
| 300 |
|
---|
| 301 | <screen role="root" revision="systemd"><userinput>systemctl enable dovecot</userinput></screen>
|
---|
[8a8b05e] | 302 |
|
---|
| 303 | </sect3>
|
---|
| 304 |
|
---|
| 305 | </sect2>
|
---|
| 306 |
|
---|
| 307 | <sect2 role="content">
|
---|
| 308 | <title>Contents</title>
|
---|
| 309 |
|
---|
| 310 | <segmentedlist>
|
---|
| 311 | <segtitle>Installed Programs</segtitle>
|
---|
| 312 | <segtitle>Installed Libraries</segtitle>
|
---|
| 313 | <segtitle>Installed Directories</segtitle>
|
---|
| 314 |
|
---|
| 315 | <seglistitem>
|
---|
| 316 | <seg>
|
---|
[a08727f] | 317 | doveadm, doveconf, dovecot, and dsync (symbolic link)
|
---|
[8a8b05e] | 318 | </seg>
|
---|
| 319 | <seg>
|
---|
[a08727f] | 320 | various internal plugins in <filename
|
---|
| 321 | class="directory">/usr/lib/dovecot</filename>
|
---|
[8a8b05e] | 322 | </seg>
|
---|
| 323 | <seg>
|
---|
| 324 | /etc/dovecot,
|
---|
[f9f13ae] | 325 | /usr/{include,lib,libexec,share}/dovecot and
|
---|
[8a8b05e] | 326 | /usr/share/doc/dovecot-&dovecot-version;
|
---|
| 327 | </seg>
|
---|
| 328 | </seglistitem>
|
---|
| 329 | </segmentedlist>
|
---|
| 330 |
|
---|
| 331 | <variablelist>
|
---|
| 332 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 333 | <?dbfo list-presentation="list"?>
|
---|
| 334 | <?dbhtml list-presentation="table"?>
|
---|
| 335 |
|
---|
| 336 | <varlistentry id="doveadm">
|
---|
| 337 | <term><command>doveadm</command></term>
|
---|
| 338 | <listitem>
|
---|
| 339 | <para>
|
---|
| 340 | is the <application>Dovecot</application> administration tool.
|
---|
| 341 | </para>
|
---|
| 342 | <indexterm zone="dovecot doveadm">
|
---|
| 343 | <primary sortas="b-doveadm">doveadm</primary>
|
---|
| 344 | </indexterm>
|
---|
| 345 | </listitem>
|
---|
| 346 | </varlistentry>
|
---|
| 347 |
|
---|
| 348 | <varlistentry id="doveconf">
|
---|
| 349 | <term><command>doveconf</command></term>
|
---|
| 350 | <listitem>
|
---|
| 351 | <para>
|
---|
| 352 | is <application>Dovecot</application>'s configuration dumping
|
---|
| 353 | utility.
|
---|
| 354 | </para>
|
---|
| 355 | <indexterm zone="dovecot doveconf">
|
---|
| 356 | <primary sortas="b-doveconf">doveconf</primary>
|
---|
| 357 | </indexterm>
|
---|
| 358 | </listitem>
|
---|
| 359 | </varlistentry>
|
---|
| 360 |
|
---|
| 361 | <varlistentry id="dovecot-prog">
|
---|
| 362 | <term><command>dovecot</command></term>
|
---|
| 363 | <listitem>
|
---|
| 364 | <para>
|
---|
| 365 | is the IMAP and POP server.
|
---|
| 366 | </para>
|
---|
| 367 | <indexterm zone="dovecot dovecot-prog">
|
---|
| 368 | <primary sortas="b-dovecot">dovecot</primary>
|
---|
| 369 | </indexterm>
|
---|
| 370 | </listitem>
|
---|
| 371 | </varlistentry>
|
---|
| 372 |
|
---|
| 373 | <varlistentry id="dsync">
|
---|
| 374 | <term><command>dsync</command></term>
|
---|
| 375 | <listitem>
|
---|
| 376 | <para>
|
---|
| 377 | is <application>Dovecot</application>'s mailbox synchronization
|
---|
| 378 | utility.
|
---|
| 379 | </para>
|
---|
| 380 | <indexterm zone="dovecot dsync">
|
---|
| 381 | <primary sortas="b-dsync">dsync</primary>
|
---|
| 382 | </indexterm>
|
---|
| 383 | </listitem>
|
---|
| 384 | </varlistentry>
|
---|
| 385 |
|
---|
| 386 |
|
---|
| 387 | </variablelist>
|
---|
| 388 |
|
---|
| 389 | </sect2>
|
---|
| 390 |
|
---|
| 391 | </sect1>
|
---|