source: server/mail/postfix.xml@ f818fd6

12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since f818fd6 was f818fd6, checked in by Thomas Trepl <thomas@…>, 9 months ago

Upgrade postfix-3.8.2

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