source: server/mail/postfix.xml@ 178639f

10.0 10.1 11.0 11.1 9.0 9.1 lazarus qt5new trunk upgradedb xry111/intltool xry111/test-20220226
Last change on this file since 178639f was 178639f, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Update to postfix-3.4.5.
Update to mlt-6.14.0.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@21418 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 21.2 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 postfix-download-http " ">
8 <!ENTITY postfix-download-ftp "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-&postfix-version;.tar.gz">
9 <!ENTITY postfix-md5sum "093109941095390562166de766d4720d">
10 <!ENTITY postfix-size "4.4 MB">
11 <!ENTITY postfix-buildsize "200 MB">
12 <!ENTITY postfix-time "0.5 SBU">
13]>
14
15<sect1 id="postfix" xreflabel="Postfix-&postfix-version;">
16 <?dbhtml filename="postfix.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Postfix-&postfix-version;</title>
24
25 <indexterm zone="postfix">
26 <primary sortas="a-Postfix">Postfix</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Postfix</title>
31
32 <para>
33 The <application>Postfix</application> package contains a Mail Transport
34 Agent (MTA). This is useful for sending email to other users of your host
35 machine. It can also be configured to be a central mail server for your
36 domain, a mail relay agent or simply a mail delivery agent to your local
37 Internet Service Provider.
38 </para>
39
40 &lfs84_checked;
41
42 <bridgehead renderas="sect3">Package Information</bridgehead>
43 <itemizedlist spacing="compact">
44 <listitem>
45 <para>
46 Download (HTTP): <ulink url="&postfix-download-http;"/>
47 </para>
48 </listitem>
49 <listitem>
50 <para>
51 Download (FTP): <ulink url="&postfix-download-ftp;"/>
52 </para>
53 </listitem>
54 <listitem>
55 <para>
56 Download MD5 sum: &postfix-md5sum;
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download size: &postfix-size;
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Estimated disk space required: &postfix-buildsize;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Estimated build time: &postfix-time;
72 </para>
73 </listitem>
74 </itemizedlist>
75
76 <bridgehead renderas="sect3">Postfix Dependencies</bridgehead>
77
78 <bridgehead renderas="sect4">Recommended</bridgehead>
79 <para role="recommended">
80 <xref linkend="db"/>,
81 <xref linkend="cyrus-sasl"/>, and
82 <xref linkend="libnsl"/>
83 </para>
84
85 <bridgehead renderas="sect4">Optional</bridgehead>
86 <para role="optional">
87 <xref linkend="icu"/> for Email Address Internationalization (SMTPUTF8) support,
88 <xref linkend="mariadb"/> or <ulink url="http://www.mysql.com/">MySQL</ulink>,
89 <xref linkend="openldap"/>,
90 <xref linkend="pcre"/>,
91 <xref linkend="postgresql"/>,
92 <xref linkend="sqlite"/>, and
93 <ulink url="http://cr.yp.to/cdb.html">CDB</ulink> or
94 <ulink url="http://www.corpit.ru/mjt/tinycdb.html">TinyCDB</ulink>
95 </para>
96
97 <para>
98 Note that <application>SQLite</application>,
99 <application>MySQL</application>, <application>PostgreSQL</application>
100 and <application>CDB</application> are only useful if there is a known
101 need for them.
102 </para>
103
104 <para condition="html" role="usernotes">
105 User Notes: <ulink url="&blfs-wiki;/postfix"/>
106 </para>
107 </sect2>
108
109 <sect2 role="installation">
110 <title>Installation of Postfix</title>
111
112 <sect3>
113 <title>Adding Users and Groups</title>
114
115 <para>
116 Before you compile the program, you need to create users and groups that
117 will be expected to be in place during the installation. Add the users
118 and groups with the following commands issued by the
119 <systemitem class="username">root</systemitem> user:
120 </para>
121
122<screen role="root"><userinput>groupadd -g 32 postfix &amp;&amp;
123groupadd -g 33 postdrop &amp;&amp;
124useradd -c "Postfix Daemon User" -d /var/spool/postfix -g postfix \
125 -s /bin/false -u 32 postfix &amp;&amp;
126chown -v postfix:postfix /var/mail</userinput></screen>
127 </sect3>
128
129 <sect3>
130 <title>Configuring the Build</title>
131
132 <para>
133 The README files are formatted to be read with a pager like
134 <application>Less</application> or <application>More</application>.
135 If you want to use a text editor, make them legible with the
136 following sed:
137 </para>
138
139<screen><userinput>sed -i 's/.\x08//g' README_FILES/*</userinput></screen>
140
141 <para>
142 The <application>Postfix</application> source tree does not contain a
143 <filename>configure</filename> script, rather the makefile in the
144 top-level directory contains a <option>makefiles</option> target that
145 regenerates all the other makefiles in the build tree. If you wish to
146 use additional software such as a database back-end for virtual users,
147 or TLS/SSL authentication, you will need to regenerate the makefiles
148 using one or more of the appropriate <envar>CCARGS</envar> and
149 <envar>AUXLIBS</envar> settings listed below.
150 </para>
151
152 <para>
153 For more details read the readme files.
154 </para>
155<!-- We reverted to Berkeley DB-5.3.28 and that is handled
156 <para>
157 The current version of <xref linkend="db"/> is not recognised by a
158 hard-coded test for known versions. To build with this version use the
159 following sed:
160 </para>
161
162<screen><userinput>sed -i 's/DB_VERSION_MAJOR == 6 .*||/DB_VERSION_MAJOR &gt; 4 ||/' \
163 src/util/dict_db.c</userinput></screen>
164-->
165 <sect4>
166 <title>Cyrus-SASL</title>
167
168 <para>
169 To use <application>Cyrus-SASL</application> with
170 <application>Postfix</application>, use the following arguments:
171 </para>
172
173<screen><literal>CCARGS='-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl'
174AUXLIBS='-lsasl2'</literal></screen>
175
176 </sect4>
177
178 <sect4>
179 <title>OpenLDAP</title>
180
181 <para>
182 To use <application>OpenLDAP</application> with
183 <application>Postfix</application>, use the following arguments:
184 </para>
185
186<screen><literal>CCARGS='-DHAS_LDAP'
187AUXLIBS='-lldap -llber'</literal></screen>
188
189 </sect4>
190
191 <sect4>
192 <title>Sqlite</title>
193
194 <para>
195 To use <application>Sqlite</application> with
196 <application>Postfix</application>, use the following arguments:
197 </para>
198
199<screen><literal>CCARGS='-DHAS_SQLITE'
200AUXLIBS='-lsqlite3 -lpthread'</literal></screen>
201
202 </sect4>
203
204 <sect4>
205 <title>MySQL</title>
206
207 <para>
208 To use <application>MySQL</application> with
209 <application>Postfix</application>, use the following arguments:
210 </para>
211
212<screen><literal>CCARGS='-DHAS_MYSQL -I/usr/include/mysql'
213AUXLIBS='-lmysqlclient -lz -lm'</literal></screen>
214
215 </sect4>
216
217 <sect4>
218 <title>PostgreSQL</title>
219
220 <para>
221 To use <application>PostgreSQL</application> with
222 <application>Postfix</application>, use the following arguments:
223 </para>
224
225<screen><literal>CCARGS='-DHAS_PGSQL -I/usr/include/postgresql'
226AUXLIBS='-lpq -lz -lm'</literal></screen>
227
228 </sect4>
229
230 <sect4>
231 <title>CDB/TinyCDB</title>
232
233 <para>
234 To use <application>CDB</application> or
235 <application>TinyCDB</application> with
236 <application>Postfix</application>, use the following arguments:
237 </para>
238
239<screen><literal>CCARGS='-DHAS_CDB'
240AUXLIBS='<replaceable>&lt;/path/to/CDB&gt;</replaceable>/libcdb.a'</literal></screen>
241
242 </sect4>
243
244 <sect4>
245 <title>StartTLS Authentication</title>
246
247 <para>
248 To use <application>OpenSSL</application> with
249 <application>Postfix</application>, use the following arguments:
250 </para>
251
252<screen><literal>CCARGS='-DUSE_TLS -I/usr/include/openssl/'
253AUXLIBS='-lssl -lcrypto'</literal></screen>
254 </sect4>
255
256 </sect3>
257
258 <sect3>
259 <title>Installing Postfix</title>
260
261 <para>Now fix a file to work with Linux-5.x.</para>
262
263<screen><userinput>sed -i -e 's/\$RELEASE_MAJOR/3/' \
264 -e '/Linux..3/s/34/345/' makedefs</userinput></screen>
265
266 <para>
267 If you have <application>Cyrus SASL</application> and
268 <application>OpenSSL</application> installed, install
269 <application>Postfix</application> by running the following commands:
270 </para>
271
272<screen><userinput>make CCARGS="-DUSE_TLS -I/usr/include/openssl/ \
273 -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \
274 AUXLIBS="-lssl -lcrypto -lsasl2" \
275 makefiles &amp;&amp;
276make</userinput></screen>
277
278 <!-- There is a testsuite, but it fails a lot. It seems to need
279 the host to be specifically setup for the tests.
280 Run with `make tests' and `make root_tests' -->
281 <para>
282 This package does not come with a useful test suite.
283 </para>
284
285 <para>
286 Now, as the <systemitem class="username">root</systemitem> user:
287 </para>
288
289<!-- dev note: sh postfix-install -non-interactive install_root=<DESTDIR> ... -->
290
291<screen role="root"><userinput>sh postfix-install -non-interactive \
292 daemon_directory=/usr/lib/postfix \
293 manpage_directory=/usr/share/man \
294 html_directory=/usr/share/doc/postfix-&postfix-version;/html \
295 readme_directory=/usr/share/doc/postfix-&postfix-version;/readme</userinput></screen>
296
297 </sect3>
298
299 </sect2>
300
301 <sect2 role="commands">
302 <title>Command Explanations</title>
303
304 <para>
305 <command>make makefiles</command>: This command rebuilds the makefiles
306 throughout the source tree to use the options contained in the
307 <envar>CCARGS</envar> and <envar>AUXLIBS</envar> variables.
308 </para>
309
310 <para>
311 <command>sh postfix-install -non-interactive</command>: This keeps the
312 install script from asking any questions, thereby accepting default
313 destination directories in all but the few cases. If the
314 <option>html_directory</option> and <option>readme_directory</option>
315 options are not set then the documentation will not be installed.
316 </para>
317
318 <para>
319 <option>CCARGS="-DNO_EAI ..."</option>: this will turn off SMTPUTF8
320 support, for example if the rest of your email address infrastructure
321 cannot handle UTF-8 email addresses and message header values.
322 </para>
323
324 </sect2>
325
326 <sect2 role="configuration">
327 <title>Configuring Postfix</title>
328
329 <sect3 id="postfix-config">
330 <title>Config Files</title>
331
332 <para>
333 <filename>/etc/aliases</filename>,
334 <filename>/etc/postfix/main.cf</filename>, and
335 <filename>/etc/postfix/master.cf</filename>
336 </para>
337
338 <indexterm zone="postfix postfix-config">
339 <primary sortas="e-etc-aliases">/etc/aliases</primary>
340 </indexterm>
341
342 <indexterm zone="postfix postfix-config">
343 <primary sortas="e-etc-postfix-star">/etc/postfix/*</primary>
344 </indexterm>
345
346 </sect3>
347
348 <sect3>
349 <title>Configuration Information</title>
350
351 <para>
352 Create (or append to an existing) <filename>/etc/aliases</filename>
353 with the following command. Change
354 <replaceable>&lt;LOGIN&gt;</replaceable> for your non-root login
355 identity so mail addressed to
356 <systemitem class="username">root</systemitem> can be forwarded to you.
357 As the <systemitem class="username">root</systemitem> user:
358 </para>
359
360<screen role="root"><userinput>cat &gt;&gt; /etc/aliases &lt;&lt; "EOF"
361<literal># Begin /etc/aliases
362
363MAILER-DAEMON: postmaster
364postmaster: root
365
366root: <replaceable>&lt;LOGIN&gt;</replaceable>
367# End /etc/aliases</literal>
368EOF</userinput></screen>
369
370 <para>
371 To protect an existing <filename>/etc/aliases</filename> file,
372 the above command appends these aliases to it if it exists. This file
373 should be checked and duplicate aliases removed, if present.
374 </para>
375
376 <note>
377 <para>
378 The <filename>/etc/postfix/main.cf</filename> and
379 <filename>/etc/postfix/master.cf</filename> files must be personalized
380 for your system. The <filename>main.cf</filename> file needs your
381 fully qualified hostname. You will find that
382 <filename>main.cf</filename> is self documenting, so load it into your
383 editor to make the changes you need for your situation.
384 </para>
385 </note>
386
387 <note>
388 <para>
389 <application>Postfix</application> can also be set up to
390 run in a chroot jail. See the file in the source
391 <filename>examples/chroot-setup/LINUX2</filename> for details.
392 </para>
393 </note>
394
395 <para>
396 If you have an existing configuration, you can run the
397 <command>postfix</command> utility to add any necessary definitions to
398 your existing files. As the
399 <systemitem class="username">root</systemitem> user:
400 </para>
401
402<screen role="root"><userinput>/usr/sbin/postfix upgrade-configuration</userinput></screen>
403
404 <para>
405 Before starting <application>Postfix</application>, you should check
406 that your configuration and file permissions will work properly. Run the
407 following commands as the <systemitem class="username">root</systemitem>
408 user to check and start your <application>Postfix</application> server:
409 </para>
410
411<screen role="root"><userinput>/usr/sbin/postfix check &amp;&amp;
412/usr/sbin/postfix start</userinput></screen>
413
414 </sect3>
415
416 <sect3 id="postfix-init">
417 <title><phrase revision="sysv">Boot Script</phrase>
418 <phrase revision="systemd">Systemd Unit</phrase></title>
419
420 <para>
421 To automate the running of Postfix at startup, install the
422 <phrase revision="sysv"><filename>/etc/rc.d/init.d/postfix</filename>
423 init script</phrase>
424 <phrase revision="systemd"><filename>postfix.service</filename>
425 unit</phrase> included in the
426 <xref linkend="bootscripts" revision="sysv"/>
427 <xref linkend="systemd-units" revision="systemd"/> package.
428 </para>
429
430 <indexterm zone="postfix postfix-init">
431 <primary sortas="f-postfix">postfix</primary>
432 </indexterm>
433
434<screen role="root"><userinput>make install-postfix</userinput></screen>
435
436 </sect3>
437
438 </sect2>
439
440 <sect2 role="content">
441 <title>Contents</title>
442
443 <segmentedlist>
444 <segtitle>Installed Programs</segtitle>
445 <segtitle>Installed Libraries</segtitle>
446 <segtitle>Installed Directories</segtitle>
447
448 <seglistitem>
449 <seg>
450 mailq (symlink), newaliases (symlink), postalias, postcat, postconf,
451 postdrop, postfix, postkick, postlock, postlog, postmap, postmulti,
452 postqueue, postsuper, and sendmail
453 </seg>
454 <seg>
455 None
456 </seg>
457 <seg>
458 /{etc,usr/lib}/postfix,
459 /usr/share/doc/postfix-&postfix-version; and
460 /var/{lib,spool}/postfix
461 </seg>
462 </seglistitem>
463 </segmentedlist>
464
465 <variablelist>
466 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
467 <?dbfo list-presentation="list"?>
468 <?dbhtml list-presentation="table"?>
469
470 <varlistentry id="mailq">
471 <term><command>mailq</command></term>
472 <listitem>
473 <para>
474 A symlink to <filename>sendmail</filename>.
475 </para>
476 <indexterm zone="postfix mailq">
477 <primary sortas="b-mailq">mailq</primary>
478 </indexterm>
479 </listitem>
480 </varlistentry>
481
482 <varlistentry id="newaliases">
483 <term><command>newaliases</command></term>
484 <listitem>
485 <para>
486 A symlink to <filename>sendmail</filename>.
487 </para>
488 <indexterm zone="postfix newaliases">
489 <primary sortas="b-newaliases">newaliases</primary>
490 </indexterm>
491 </listitem>
492 </varlistentry>
493
494 <varlistentry id="postalias">
495 <term><command>postalias</command></term>
496 <listitem>
497 <para>
498 is a utility for <application>Postfix</application> alias database
499 maintenance
500 </para>
501 <indexterm zone="postfix postalias">
502 <primary sortas="b-postalias">postalias</primary>
503 </indexterm>
504 </listitem>
505 </varlistentry>
506
507 <varlistentry id="postcat">
508 <term><command>postcat</command></term>
509 <listitem>
510 <para>
511 Prints the contents of files from the
512 <application>Postfix</application> queue in human readable format.
513 </para>
514 <indexterm zone="postfix postcat">
515 <primary sortas="b-postcat">postcat</primary>
516 </indexterm>
517 </listitem>
518 </varlistentry>
519
520 <varlistentry id="postconf">
521 <term><command>postconf</command></term>
522 <listitem>
523 <para>
524 Displays or changes the value of
525 <application>Postfix</application> configuration parameters.
526 </para>
527 <indexterm zone="postfix postconf">
528 <primary sortas="b-postconf">postconf</primary>
529 </indexterm>
530 </listitem>
531 </varlistentry>
532
533 <varlistentry id="postdrop">
534 <term><command>postdrop</command></term>
535 <listitem>
536 <para>
537 Creates a file in the maildrop directory and copies its standard
538 input to the file.
539 </para>
540 <indexterm zone="postfix postdrop">
541 <primary sortas="b-postdrop">postdrop</primary>
542 </indexterm>
543 </listitem>
544 </varlistentry>
545
546 <varlistentry id="postfix-bin">
547 <term><command>postfix</command></term>
548 <listitem>
549 <para>
550 is the <application>Postfix</application> control program.
551 </para>
552 <indexterm zone="postfix postfix-bin">
553 <primary sortas="b-postfix">postfix</primary>
554 </indexterm>
555 </listitem>
556 </varlistentry>
557
558 <varlistentry id="postkick">
559 <term><command>postkick</command></term>
560 <listitem>
561 <para>
562 Sends requests to the specified service over a local transport
563 channel.
564 </para>
565 <indexterm zone="postfix postkick">
566 <primary sortas="b-postkick">postkick</primary>
567 </indexterm>
568 </listitem>
569 </varlistentry>
570
571 <varlistentry id="postlock">
572 <term><command>postlock</command></term>
573 <listitem>
574 <para>
575 Locks a mail folder for exclusive use, and executes commands passed
576 to it.
577 </para>
578 <indexterm zone="postfix postlock">
579 <primary sortas="b-postlock">postlock</primary>
580 </indexterm>
581 </listitem>
582 </varlistentry>
583
584 <varlistentry id="postlog">
585 <term><command>postlog</command></term>
586 <listitem>
587 <para>
588 A <application>Postfix</application>-compatible logging interface
589 for use in, for example, shell scripts.
590 </para>
591 <indexterm zone="postfix postlog">
592 <primary sortas="b-postlog">postlog</primary>
593 </indexterm>
594 </listitem>
595 </varlistentry>
596
597 <varlistentry id="postmap">
598 <term><command>postmap</command></term>
599 <listitem>
600 <para>
601 Creates or queries one or more Postfix lookup tables, or updates an
602 existing one.
603 </para>
604 <indexterm zone="postfix postmap">
605 <primary sortas="b-postmap">postmap</primary>
606 </indexterm>
607 </listitem>
608 </varlistentry>
609
610 <varlistentry id="postmulti">
611 <term><command>postmulti</command></term>
612 <listitem>
613 <para>
614 is the <application>Postfix</application> multi-instance manager.
615 It allows a system administrator to manage multiple
616 <application>Postfix</application> instances on a single host.
617 </para>
618 <indexterm zone="postfix postmulti">
619 <primary sortas="b-postmulti">postmulti</primary>
620 </indexterm>
621 </listitem>
622 </varlistentry>
623
624 <varlistentry id="postqueue">
625 <term><command>postqueue</command></term>
626 <listitem>
627 <para>
628 The <application>Postfix</application> user interface for
629 queue management.
630 </para>
631 <indexterm zone="postfix postqueue">
632 <primary sortas="b-postqueue">postqueue</primary>
633 </indexterm>
634 </listitem>
635 </varlistentry>
636
637 <varlistentry id="postsuper">
638 <term><command>postsuper</command></term>
639 <listitem>
640 <para>
641 The <application>Postfix</application> user interface for
642 superuser queue management.
643 </para>
644 <indexterm zone="postfix postsuper">
645 <primary sortas="b-postsuper">postsuper</primary>
646 </indexterm>
647 </listitem>
648 </varlistentry>
649
650 <varlistentry id="sendmail-postfix">
651 <term><command>sendmail</command></term>
652 <listitem>
653 <para>
654 is the <application>Postfix</application> to
655 <application>Sendmail</application> compatibility interface.
656 </para>
657 <indexterm zone="postfix sendmail-postfix">
658 <primary sortas="b-sendmail">sendmail</primary>
659 </indexterm>
660 </listitem>
661 </varlistentry>
662
663 </variablelist>
664
665 </sect2>
666
667</sect1>
Note: See TracBrowser for help on using the repository browser.