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