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