source: server/mail/dovecot.xml

trunk
Last change on this file was dca2f66a, checked in by Douglas R. Reno <renodr@…>, 4 weeks ago

Dovecot, mariadb, wireshark, and systemd: remove the LZ4 dependency.

LZ4 is now in LFS, so it doesn't need to be mentioned in BLFS anymore.

For Dovecot, also add libunwind as optional.

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