source: server/mail/dovecot.xml@ 6ba3ab5

lazarus trunk
Last change on this file since 6ba3ab5 was 6ba3ab5, checked in by Xi Ruoyao <xry111@…>, 3 months ago

bookwide: Remove external references for lz4

Now lz4 is in LFS. Also remove switches for building without lz4.

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