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