[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 " ">
|
---|
[7df3dd1] | 10 | <!ENTITY dovecot-md5sum "2f03532cec3280ae45a101a7a55ccef5">
|
---|
| 11 | <!ENTITY dovecot-size "7.2 MB">
|
---|
| 12 | <!ENTITY dovecot-buildsize "200 MB">
|
---|
[9ade54a3] | 13 | <!ENTITY dovecot-time "4.8 SBU">
|
---|
[8a8b05e] | 14 | ]>
|
---|
| 15 |
|
---|
| 16 | <sect1 id="dovecot" xreflabel="Dovecot-&dovecot-version;">
|
---|
| 17 | <?dbhtml filename="dovecot.html"?>
|
---|
| 18 |
|
---|
| 19 | <sect1info>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>Dovecot-&dovecot-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="dovecot">
|
---|
| 26 | <primary sortas="a-Dovecot">Dovecot</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to Dovecot</title>
|
---|
| 31 |
|
---|
| 32 | <para>
|
---|
| 33 | <application>Dovecot</application> is an Internet Message Access Protocol
|
---|
| 34 | (IMAP) and Post Office Protocol (POP) server, written primarily with
|
---|
| 35 | security in mind. <application>Dovecot</application> aims to be
|
---|
| 36 | lightweight, fast and easy to set up as well as highly configurable and
|
---|
| 37 | easily extensible with plugins.
|
---|
| 38 | </para>
|
---|
| 39 |
|
---|
[72d8eb3] | 40 | &lfs101_checked;
|
---|
[8a8b05e] | 41 |
|
---|
| 42 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 43 | <itemizedlist spacing="compact">
|
---|
| 44 | <listitem>
|
---|
| 45 | <para>
|
---|
| 46 | Download (HTTP): <ulink url="&dovecot-download-http;"/>
|
---|
| 47 | </para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>
|
---|
| 51 | Download (FTP): <ulink url="&dovecot-download-ftp;"/>
|
---|
| 52 | </para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>
|
---|
| 56 | Download MD5 sum: &dovecot-md5sum;
|
---|
| 57 | </para>
|
---|
| 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
| 60 | <para>
|
---|
| 61 | Download size: &dovecot-size;
|
---|
| 62 | </para>
|
---|
| 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
| 65 | <para>
|
---|
| 66 | Estimated disk space required: &dovecot-buildsize;
|
---|
| 67 | </para>
|
---|
| 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
| 70 | <para>
|
---|
| 71 | Estimated build time: &dovecot-time;
|
---|
| 72 | </para>
|
---|
| 73 | </listitem>
|
---|
| 74 | </itemizedlist>
|
---|
[2c5dfc2d] | 75 |
|
---|
[8a8b05e] | 76 | <bridgehead renderas="sect3">Dovecot Dependencies</bridgehead>
|
---|
| 77 |
|
---|
[904c9b2] | 78 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 79 | <para role="required">
|
---|
| 80 | <xref linkend="libtirpc"/>
|
---|
| 81 | </para>
|
---|
| 82 |
|
---|
[8a8b05e] | 83 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 84 | <para role="optional">
|
---|
[3acd0b1] | 85 | <xref linkend="clucene"/>,
|
---|
[f9f13ae] | 86 | <xref linkend="icu"/>,
|
---|
[56605b9] | 87 | <xref linkend="libcap-pam"/>,
|
---|
[8a8b05e] | 88 | <xref linkend="linux-pam"/>,
|
---|
[5ff2b55] | 89 | <xref linkend="lua"/>,
|
---|
[3acd0b1] | 90 | <xref linkend="mariadb"/> or <ulink url="http://www.mysql.com/">MySQL</ulink>,
|
---|
[8a8b05e] | 91 | <xref linkend="openldap"/>,
|
---|
| 92 | <xref linkend="postgresql"/>,
|
---|
[f9f13ae] | 93 | <xref linkend="sqlite"/>,
|
---|
| 94 | <xref linkend="valgrind"/>,
|
---|
[194a584] | 95 | <xref linkend="xfsprogs"/>,
|
---|
[f9f13ae] | 96 | <ulink url="https://cassandra.apache.org/">Cassandra</ulink>,
|
---|
[5c0c700] | 97 | <ulink url="https://github.com/Cyan4973/lz4">lz4</ulink>,
|
---|
| 98 | <ulink url="https://github.com/shibukawa/snowball_py">stemmer</ulink> and
|
---|
| 99 | <ulink url="https://libsodium.gitbook.io/doc/">libsodium</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>
|
---|
[22a8219] | 124 | First, adapt the Lua plugin to Lua-5.4:
|
---|
[2cd4158] | 125 | </para>
|
---|
| 126 |
|
---|
[22a8219] | 127 | <screen><userinput remap="pre">sed -i 's/lua_newuserdata/lua_newuserdatauv/' src/lib-lua/dlua-dovecot.c</userinput></screen>
|
---|
[2cd4158] | 128 |
|
---|
[8a8b05e] | 129 | <para>
|
---|
| 130 | Install <application>Dovecot</application> by running the following
|
---|
| 131 | commands:
|
---|
| 132 | </para>
|
---|
| 133 |
|
---|
[f4302700] | 134 | <screen revision="sysv"><userinput>CPPFLAGS="-I/usr/include/tirpc" \
|
---|
[2cd4158] | 135 | LDFLAGS+=" -ltirpc" \
|
---|
[6c1d0776] | 136 | ./configure --prefix=/usr \
|
---|
[1258125] | 137 | --sysconfdir=/etc \
|
---|
| 138 | --localstatedir=/var \
|
---|
[bbfaed7] | 139 | --rundir=/run \
|
---|
[8a8b05e] | 140 | --docdir=/usr/share/doc/dovecot-&dovecot-version; \
|
---|
| 141 | --disable-static &&
|
---|
| 142 | make</userinput></screen>
|
---|
| 143 |
|
---|
[f4302700] | 144 | <screen revision="systemd"><userinput>CPPFLAGS="-I/usr/include/tirpc" \
|
---|
[2cd4158] | 145 | LDFLAGS+=" -ltirpc" \
|
---|
[6c1d0776] | 146 | ./configure --prefix=/usr \
|
---|
[1258125] | 147 | --sysconfdir=/etc \
|
---|
| 148 | --localstatedir=/var \
|
---|
[bbfaed7] | 149 | --rundir=/run \
|
---|
[1258125] | 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>
|
---|
[22a8219] | 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 |
|
---|
[27b601a] | 172 | <para>
|
---|
[f4302700] | 173 | <command>CPPFLAGS=... LDFLAGS+=...</command>: build with libtirpc
|
---|
[27b601a] | 174 | instead of the recently removed RPC code provided by GlibC.
|
---|
| 175 | </para>
|
---|
[6c1d0776] | 176 |
|
---|
[8a8b05e] | 177 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 178 | href="../../xincludes/static-libraries.xml"/>
|
---|
| 179 |
|
---|
[f7841987] | 180 | <para revision="systemd">
|
---|
[1258125] | 181 | <parameter>--with-systemdsystemunitdir=/lib/systemd/system</parameter>:
|
---|
| 182 | This switch is used to set the correct installation directory for
|
---|
| 183 | systemd units.
|
---|
| 184 | </para>
|
---|
| 185 |
|
---|
[8a8b05e] | 186 | <para>
|
---|
| 187 | <option>--with-ldap</option>: This switch enables
|
---|
| 188 | <application>OpenLDAP</application> authentication support.
|
---|
| 189 | </para>
|
---|
[2d9f558] | 190 |
|
---|
[8a8b05e] | 191 | <para>
|
---|
| 192 | <option>--with-pgsql</option>: This switch enables
|
---|
[22a8219] | 193 | <application>PostgreSQL</application> database support.
|
---|
[8a8b05e] | 194 | </para>
|
---|
[2d9f558] | 195 |
|
---|
[8a8b05e] | 196 | <para>
|
---|
| 197 | <option>--with-mysql</option>: This switch enables
|
---|
[22a8219] | 198 | <application>MySQL</application> database support.
|
---|
[8a8b05e] | 199 | </para>
|
---|
[2d9f558] | 200 |
|
---|
[8a8b05e] | 201 | <para>
|
---|
| 202 | <option>--with-sqlite</option>: This switch enables
|
---|
[22a8219] | 203 | <application>SQLite</application> database support.
|
---|
[8a8b05e] | 204 | </para>
|
---|
[2d9f558] | 205 |
|
---|
[8a8b05e] | 206 | <para>
|
---|
| 207 | <option>--with-lucene</option>: This switch enables
|
---|
| 208 | <application>CLucene</application> full text search support.
|
---|
| 209 | </para>
|
---|
[eb7de89] | 210 |
|
---|
| 211 | <para>
|
---|
| 212 | <option>--with-lua</option>: This switch enables
|
---|
| 213 | <application>Lua</application> plugin support. This includes
|
---|
| 214 | a mail and push notification plugin.
|
---|
| 215 | </para>
|
---|
| 216 |
|
---|
[71f567d] | 217 | <!--
|
---|
[2d9f558] | 218 | <para>
|
---|
[71f567d] | 219 | <option>- -with-krb5</option>: This switch enables
|
---|
[2d9f558] | 220 | GSSAPI authentication support.
|
---|
| 221 | </para>
|
---|
[71f567d] | 222 | -->
|
---|
[8a8b05e] | 223 | </sect2>
|
---|
| 224 |
|
---|
| 225 | <sect2 role="configuration">
|
---|
| 226 | <title>Configuring Dovecot</title>
|
---|
| 227 |
|
---|
| 228 | <sect3 id="dovecot-config">
|
---|
| 229 | <title>Config Files</title>
|
---|
| 230 |
|
---|
| 231 | <para>
|
---|
| 232 | <filename>/etc/dovecot/dovecot.conf</filename>,
|
---|
| 233 | <filename>/etc/dovecot/conf.d/*</filename>, and
|
---|
| 234 | <filename>/etc/dovecot/local.conf</filename>
|
---|
| 235 | </para>
|
---|
| 236 |
|
---|
| 237 | <indexterm zone="dovecot dovecot-config">
|
---|
| 238 | <primary sortas="e-etc-dovecot-dovecot.conf">/etc/dovecot/dovecot.conf</primary>
|
---|
| 239 | </indexterm>
|
---|
| 240 | <indexterm zone="dovecot dovecot-config">
|
---|
| 241 | <primary sortas="e-etc-dovecot-conf.d">/etc/dovecot/conf.d/*</primary>
|
---|
| 242 | </indexterm>
|
---|
| 243 | <indexterm zone="dovecot dovecot-config">
|
---|
| 244 | <primary sortas="e-etc-dovecot-local.conf">/etc/dovecot/local.conf</primary>
|
---|
| 245 | </indexterm>
|
---|
| 246 |
|
---|
| 247 | </sect3>
|
---|
| 248 |
|
---|
| 249 | <sect3>
|
---|
| 250 | <title>Configuration Information</title>
|
---|
| 251 |
|
---|
| 252 | <para>
|
---|
| 253 | Copy an example configuration, which you can use as a starting point:
|
---|
| 254 | </para>
|
---|
| 255 |
|
---|
| 256 | <screen role="root"><userinput>cp -rv /usr/share/doc/dovecot-&dovecot-version;/example-config/* /etc/dovecot</userinput></screen>
|
---|
| 257 |
|
---|
| 258 | <para>
|
---|
| 259 | The following configuration is a simple proof of concept with IMAP
|
---|
| 260 | service using local users for authentication and mailbox location.
|
---|
| 261 | Reading files from the <filename class="directory">conf.d</filename>
|
---|
| 262 | directory is commented out since the included example configuration
|
---|
| 263 | requires <application>OpenSSL</application> and
|
---|
| 264 | <application>Linux PAM</application>.
|
---|
| 265 | </para>
|
---|
| 266 |
|
---|
| 267 | <screen role="root"><userinput>sed -i '/^\!include / s/^/#/' /etc/dovecot/dovecot.conf &&
|
---|
| 268 | chmod -v 1777 /var/mail &&
|
---|
| 269 | cat > /etc/dovecot/local.conf << "EOF"
|
---|
| 270 | <literal>protocols = imap
|
---|
| 271 | ssl = no
|
---|
[2d9f558] | 272 | # The next line is only needed if you have no IPv6 network interfaces
|
---|
| 273 | listen = *
|
---|
[8a8b05e] | 274 | mail_location = mbox:~/Mail:INBOX=/var/mail/%u
|
---|
| 275 | userdb {
|
---|
| 276 | driver = passwd
|
---|
| 277 | }
|
---|
| 278 | passdb {
|
---|
| 279 | driver = shadow
|
---|
| 280 | }</literal>
|
---|
| 281 | EOF</userinput></screen>
|
---|
| 282 |
|
---|
| 283 | <para>
|
---|
| 284 | You will definitely want to read the official documentation at <ulink
|
---|
| 285 | url="http://wiki2.dovecot.org/"/> if you plan to use
|
---|
[9ade54a3] | 286 | <application>Dovecot</application> in a production environment.
|
---|
[8a8b05e] | 287 | </para>
|
---|
| 288 |
|
---|
| 289 | </sect3>
|
---|
| 290 |
|
---|
| 291 | <sect3 id="dovecot-init">
|
---|
[1258125] | 292 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 293 | <phrase revision="systemd">Systemd Unit</phrase></title>
|
---|
[8a8b05e] | 294 |
|
---|
[47274444] | 295 | <para revision="sysv">
|
---|
| 296 | If you want the <application>Dovecot</application>
|
---|
| 297 | server to start automatically when the system is booted, install the
|
---|
| 298 | <filename>/etc/rc.d/init.d/dovecot</filename> init script included in
|
---|
| 299 | the <xref linkend="bootscripts"/> package.
|
---|
| 300 | </para>
|
---|
| 301 |
|
---|
| 302 | <para revision="systemd">
|
---|
| 303 | To start the <command>dovecot</command>
|
---|
| 304 | daemon at boot, enable the previously installed systemd unit with the
|
---|
| 305 | following command:
|
---|
| 306 | </para>
|
---|
[8a8b05e] | 307 |
|
---|
| 308 | <indexterm zone="dovecot dovecot-init">
|
---|
| 309 | <primary sortas="f-dovecot">dovecot</primary>
|
---|
| 310 | </indexterm>
|
---|
| 311 |
|
---|
[1258125] | 312 | <screen role="root" revision="sysv"><userinput>make install-dovecot</userinput></screen>
|
---|
| 313 |
|
---|
| 314 | <screen role="root" revision="systemd"><userinput>systemctl enable dovecot</userinput></screen>
|
---|
[8a8b05e] | 315 |
|
---|
| 316 | </sect3>
|
---|
| 317 |
|
---|
| 318 | </sect2>
|
---|
| 319 |
|
---|
| 320 | <sect2 role="content">
|
---|
| 321 | <title>Contents</title>
|
---|
| 322 |
|
---|
| 323 | <segmentedlist>
|
---|
| 324 | <segtitle>Installed Programs</segtitle>
|
---|
| 325 | <segtitle>Installed Libraries</segtitle>
|
---|
| 326 | <segtitle>Installed Directories</segtitle>
|
---|
| 327 |
|
---|
| 328 | <seglistitem>
|
---|
| 329 | <seg>
|
---|
[3d9b01d] | 330 | doveadm, doveconf, dovecot, dovecot-sysreport, and dsync (symbolic link)
|
---|
[8a8b05e] | 331 | </seg>
|
---|
| 332 | <seg>
|
---|
[4c24eb0a] | 333 | various internal plugins in
|
---|
| 334 | <filename class="directory">/usr/lib/dovecot</filename>
|
---|
[8a8b05e] | 335 | </seg>
|
---|
| 336 | <seg>
|
---|
| 337 | /etc/dovecot,
|
---|
[f9f13ae] | 338 | /usr/{include,lib,libexec,share}/dovecot and
|
---|
[8a8b05e] | 339 | /usr/share/doc/dovecot-&dovecot-version;
|
---|
| 340 | </seg>
|
---|
| 341 | </seglistitem>
|
---|
| 342 | </segmentedlist>
|
---|
| 343 |
|
---|
| 344 | <variablelist>
|
---|
| 345 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 346 | <?dbfo list-presentation="list"?>
|
---|
| 347 | <?dbhtml list-presentation="table"?>
|
---|
| 348 |
|
---|
| 349 | <varlistentry id="doveadm">
|
---|
| 350 | <term><command>doveadm</command></term>
|
---|
| 351 | <listitem>
|
---|
| 352 | <para>
|
---|
[4c24eb0a] | 353 | is the <application>Dovecot</application> administration tool
|
---|
[8a8b05e] | 354 | </para>
|
---|
| 355 | <indexterm zone="dovecot doveadm">
|
---|
| 356 | <primary sortas="b-doveadm">doveadm</primary>
|
---|
| 357 | </indexterm>
|
---|
| 358 | </listitem>
|
---|
| 359 | </varlistentry>
|
---|
| 360 |
|
---|
| 361 | <varlistentry id="doveconf">
|
---|
| 362 | <term><command>doveconf</command></term>
|
---|
| 363 | <listitem>
|
---|
| 364 | <para>
|
---|
| 365 | is <application>Dovecot</application>'s configuration dumping
|
---|
[4c24eb0a] | 366 | utility
|
---|
[8a8b05e] | 367 | </para>
|
---|
| 368 | <indexterm zone="dovecot doveconf">
|
---|
| 369 | <primary sortas="b-doveconf">doveconf</primary>
|
---|
| 370 | </indexterm>
|
---|
| 371 | </listitem>
|
---|
| 372 | </varlistentry>
|
---|
| 373 |
|
---|
| 374 | <varlistentry id="dovecot-prog">
|
---|
| 375 | <term><command>dovecot</command></term>
|
---|
| 376 | <listitem>
|
---|
| 377 | <para>
|
---|
[4c24eb0a] | 378 | is the IMAP and POP server
|
---|
[8a8b05e] | 379 | </para>
|
---|
| 380 | <indexterm zone="dovecot dovecot-prog">
|
---|
| 381 | <primary sortas="b-dovecot">dovecot</primary>
|
---|
| 382 | </indexterm>
|
---|
| 383 | </listitem>
|
---|
| 384 | </varlistentry>
|
---|
| 385 |
|
---|
[3d9b01d] | 386 | <varlistentry id="dovecot-sysreport">
|
---|
| 387 | <term><command>dovecot-sysreport</command></term>
|
---|
| 388 | <listitem>
|
---|
| 389 | <para>
|
---|
| 390 | prints system information that is useful to the Dovecot developers
|
---|
[4c24eb0a] | 391 | when submitting bug reports upstream
|
---|
[3d9b01d] | 392 | </para>
|
---|
| 393 | <indexterm zone="dovecot dovecot-sysreport">
|
---|
| 394 | <primary sortas="b-dovecot-sysreport">dovecot-sysreport</primary>
|
---|
| 395 | </indexterm>
|
---|
| 396 | </listitem>
|
---|
| 397 | </varlistentry>
|
---|
| 398 |
|
---|
[8a8b05e] | 399 | <varlistentry id="dsync">
|
---|
| 400 | <term><command>dsync</command></term>
|
---|
| 401 | <listitem>
|
---|
| 402 | <para>
|
---|
| 403 | is <application>Dovecot</application>'s mailbox synchronization
|
---|
[4c24eb0a] | 404 | utility
|
---|
[8a8b05e] | 405 | </para>
|
---|
| 406 | <indexterm zone="dovecot dsync">
|
---|
| 407 | <primary sortas="b-dsync">dsync</primary>
|
---|
| 408 | </indexterm>
|
---|
| 409 | </listitem>
|
---|
| 410 | </varlistentry>
|
---|
| 411 |
|
---|
| 412 |
|
---|
| 413 | </variablelist>
|
---|
| 414 |
|
---|
| 415 | </sect2>
|
---|
| 416 |
|
---|
| 417 | </sect1>
|
---|