source: server/mail/dovecot.xml@ 58a955c

11.0 qt5new trunk
Last change on this file since 58a955c was 58a955c, checked in by Douglas R. Reno <renodr@…>, 5 months ago

Fix the Dovecot plugin for Lua

  • Property mode set to 100644
File size: 13.0 KB
Line 
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 "2f03532cec3280ae45a101a7a55ccef5">
11 <!ENTITY dovecot-size "7.2 MB">
12 <!ENTITY dovecot-buildsize "200 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 <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
40 &lfs101_checked;
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>
75
76 <bridgehead renderas="sect3">Dovecot Dependencies</bridgehead>
77
78 <bridgehead renderas="sect4">Required</bridgehead>
79 <para role="required">
80 <xref linkend="libtirpc"/>
81 </para>
82
83 <bridgehead renderas="sect4">Optional</bridgehead>
84 <para role="optional">
85 <xref linkend="clucene"/>,
86 <xref linkend="icu"/>,
87 <xref linkend="libcap-pam"/>,
88 <xref linkend="linux-pam"/>,
89 <xref linkend="lua"/>,
90 <xref linkend="mariadb"/> or <ulink url="http://www.mysql.com/">MySQL</ulink>,
91 <xref linkend="openldap"/>,
92 <xref linkend="postgresql"/>,
93 <xref linkend="sqlite"/>,
94 <xref linkend="valgrind"/>,
95 <xref linkend="xfsprogs"/>,
96 <ulink url="https://cassandra.apache.org/">Cassandra</ulink>,
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>
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 &amp;&amp;
117useradd -c "Dovecot unprivileged user" -d /dev/null -u 42 \
118 -g dovecot -s /bin/false dovecot &amp;&amp;
119groupadd -g 43 dovenull &amp;&amp;
120useradd -c "Dovecot login user" -d /dev/null -u 43 \
121 -g dovenull -s /bin/false dovenull</userinput></screen>
122
123 <para>
124 First, adapt the Lua plugin to Lua-5.4:
125 </para>
126
127<screen><userinput remap="pre">sed -i 's/lua_newuserdata/lua_newuserdatauv/' src/lib-lua/dlua-dovecot.c</userinput></screen>
128
129 <para>
130 Install <application>Dovecot</application> by running the following
131 commands:
132 </para>
133
134<screen revision="sysv"><userinput>CPPFLAGS="-I/usr/include/tirpc" \
135LDFLAGS+=" -ltirpc" \
136./configure --prefix=/usr \
137 --sysconfdir=/etc \
138 --localstatedir=/var \
139 --rundir=/run \
140 --docdir=/usr/share/doc/dovecot-&dovecot-version; \
141 --disable-static &amp;&amp;
142make</userinput></screen>
143
144<screen revision="systemd"><userinput>CPPFLAGS="-I/usr/include/tirpc" \
145LDFLAGS+=" -ltirpc" \
146./configure --prefix=/usr \
147 --sysconfdir=/etc \
148 --localstatedir=/var \
149 --rundir=/run \
150 --docdir=/usr/share/doc/dovecot-&dovecot-version; \
151 --disable-static \
152 --with-systemdsystemunitdir=/lib/systemd/system &amp;&amp;
153make</userinput></screen>
154
155 <para>
156 To test the results, issue <command>make -k check</command>. <!-- An error
157 may be reported if <xref linkend="valgrind"/> is present when running
158 the test.-->
159 </para>
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
172 <para>
173 <command>CPPFLAGS=... LDFLAGS+=...</command>: build with libtirpc
174 instead of the recently removed RPC code provided by GlibC.
175 </para>
176
177 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
178 href="../../xincludes/static-libraries.xml"/>
179
180 <para revision="systemd">
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
186 <para>
187 <option>--with-ldap</option>: This switch enables
188 <application>OpenLDAP</application> authentication support.
189 </para>
190
191 <para>
192 <option>--with-pgsql</option>: This switch enables
193 <application>PostgreSQL</application> database support.
194 </para>
195
196 <para>
197 <option>--with-mysql</option>: This switch enables
198 <application>MySQL</application> database support.
199 </para>
200
201 <para>
202 <option>--with-sqlite</option>: This switch enables
203 <application>SQLite</application> database support.
204 </para>
205
206 <para>
207 <option>--with-lucene</option>: This switch enables
208 <application>CLucene</application> full text search support.
209 </para>
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
217<!--
218 <para>
219 <option>- -with-krb5</option>: This switch enables
220 GSSAPI authentication support.
221 </para>
222-->
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 &amp;&amp;
268chmod -v 1777 /var/mail &amp;&amp;
269cat &gt; /etc/dovecot/local.conf &lt;&lt; "EOF"
270<literal>protocols = imap
271ssl = no
272# The next line is only needed if you have no IPv6 network interfaces
273listen = *
274mail_location = mbox:~/Mail:INBOX=/var/mail/%u
275userdb {
276 driver = passwd
277}
278passdb {
279 driver = shadow
280}</literal>
281EOF</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
286 <application>Dovecot</application> in a production environment.
287 </para>
288
289 </sect3>
290
291 <sect3 id="dovecot-init">
292 <title><phrase revision="sysv">Boot Script</phrase>
293 <phrase revision="systemd">Systemd Unit</phrase></title>
294
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>
307
308 <indexterm zone="dovecot dovecot-init">
309 <primary sortas="f-dovecot">dovecot</primary>
310 </indexterm>
311
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>
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>
330 doveadm, doveconf, dovecot, dovecot-sysreport, and dsync (symbolic link)
331 </seg>
332 <seg>
333 various internal plugins in
334 <filename class="directory">/usr/lib/dovecot</filename>
335 </seg>
336 <seg>
337 /etc/dovecot,
338 /usr/{include,lib,libexec,share}/dovecot and
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>
353 is the <application>Dovecot</application> administration tool
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
366 utility
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>
378 is the IMAP and POP server
379 </para>
380 <indexterm zone="dovecot dovecot-prog">
381 <primary sortas="b-dovecot">dovecot</primary>
382 </indexterm>
383 </listitem>
384 </varlistentry>
385
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
391 when submitting bug reports upstream
392 </para>
393 <indexterm zone="dovecot dovecot-sysreport">
394 <primary sortas="b-dovecot-sysreport">dovecot-sysreport</primary>
395 </indexterm>
396 </listitem>
397 </varlistentry>
398
399 <varlistentry id="dsync">
400 <term><command>dsync</command></term>
401 <listitem>
402 <para>
403 is <application>Dovecot</application>'s mailbox synchronization
404 utility
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>
Note: See TracBrowser for help on using the repository browser.