source: server/mail/postfix.xml@ c289c50

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since c289c50 was 3f2db3a6, checked in by Pierre Labastie <pierre.labastie@…>, 19 months ago

Remove sect1info tags

They only contain a date tag that is nowhere used.

  • Property mode set to 100644
File size: 22.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 "bbb2168f85530fe4eaa65408a48e731b">
13 <!ENTITY postfix-size "4.6 MB">
14 <!ENTITY postfix-buildsize "152 MB"> <!-- 152M build, 55M install_root -->
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 &lfs112_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 User 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 Make an adjustment to allow <application>Postfix</application> to compile
152 on <application>Glibc-2.34</application> and later:
153 </para>
154
155<screen><userinput>sed -i '/&lt;linux/i #define HAS_CLOSEFROM' src/util/sys_defs.h</userinput></screen>
156-->
157 <para>
158 The <filename>Makefile</filename> looks at the running kernel to
159 decide how to set various things. It does not recognize Linux-6 and
160 fails to make the definitions. After that is fixed, the build
161 references the newly defined version in a header, which also breaks
162 the build. Fix both of these with the following commands:
163 </para>
164
165<!-- '&&' on a sed only fails if the file is not present,
166 not if it changes nothing, but we seem to like it -->
167<screen><userinput>sed -i 's/Linux..345/&amp;6/' makedefs &amp;&amp;
168sed -i 's/LINUX2/LINUX6/' src/util/sys_defs.h</userinput></screen>
169
170
171 <para>
172 The <application>Postfix</application> source tree does not contain a
173 <filename>configure</filename> script, rather the makefile in the
174 top-level directory contains a <option>makefiles</option> target that
175 regenerates all the other makefiles in the build tree. If you wish to
176 use additional software such as a database back-end for virtual users,
177 or TLS/SSL authentication, you will need to regenerate the makefiles
178 using one or more of the appropriate <envar>CCARGS</envar> and
179 <envar>AUXLIBS</envar> settings listed below.
180 </para>
181
182 <note>
183 <para>
184 For all variants of the CCARGS you should ensure that -DNO_NIS is
185 specified so that the build does not attempt to access an rpcsvc header
186 which does not exist in BLFS.
187 </para>
188 </note>
189
190 <para>
191 For more details read the readme files.
192 </para>
193<!-- We reverted to Berkeley DB-5.3.28 and that is handled
194 <para>
195 The current version of <xref linkend="db"/> is not recognised by a
196 hard-coded test for known versions. To build with this version use the
197 following sed:
198 </para>
199
200<screen><userinput>sed -i 's/DB_VERSION_MAJOR == 6 .*||/DB_VERSION_MAJOR &gt; 4 ||/' \
201 src/util/dict_db.c</userinput></screen>
202-->
203 <sect4>
204 <title>Cyrus-SASL</title>
205
206 <para>
207 To use <application>Cyrus-SASL</application> with
208 <application>Postfix</application>, use the following arguments:
209 </para>
210
211<screen><literal>CCARGS='-DNO_NIS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl'
212AUXLIBS='-lsasl2'</literal></screen>
213
214 </sect4>
215
216 <sect4>
217 <title>OpenLDAP</title>
218
219 <para>
220 To use <application>OpenLDAP</application> with
221 <application>Postfix</application>, use the following arguments:
222 </para>
223
224<screen><literal>CCARGS='-DNO_NIS -DHAS_LDAP'
225AUXLIBS='-lldap -llber'</literal></screen>
226
227 </sect4>
228
229 <sect4>
230 <title>Sqlite</title>
231
232 <para>
233 To use <application>Sqlite</application> with
234 <application>Postfix</application>, use the following arguments:
235 </para>
236
237<screen><literal>CCARGS='-DNO_NIS -DHAS_SQLITE'
238AUXLIBS='-lsqlite3 -lpthread'</literal></screen>
239
240 </sect4>
241
242 <sect4>
243 <title>MySQL</title>
244
245 <para>
246 To use <application>MySQL</application> with
247 <application>Postfix</application>, use the following arguments:
248 </para>
249
250<screen><literal>CCARGS='-DNO_NIS -DHAS_MYSQL -I/usr/include/mysql'
251AUXLIBS='-lmysqlclient -lz -lm'</literal></screen>
252
253 </sect4>
254
255 <sect4>
256 <title>PostgreSQL</title>
257
258 <para>
259 To use <application>PostgreSQL</application> with
260 <application>Postfix</application>, use the following arguments:
261 </para>
262
263<screen><literal>CCARGS='-DNO_NIS -DHAS_PGSQL -I/usr/include/postgresql'
264AUXLIBS='-lpq -lz -lm'</literal></screen>
265
266 </sect4>
267
268 <sect4>
269 <title>CDB/TinyCDB</title>
270
271 <para>
272 To use <application>CDB</application> or
273 <application>TinyCDB</application> with
274 <application>Postfix</application>, use the following arguments:
275 </para>
276
277<screen><literal>CCARGS='-DNO_NIS -DHAS_CDB'
278AUXLIBS='<replaceable>&lt;/path/to/CDB&gt;</replaceable>/libcdb.a'</literal></screen>
279
280 </sect4>
281
282 <sect4>
283 <title>StartTLS Authentication</title>
284
285 <para>
286 To use <application>OpenSSL</application> with
287 <application>Postfix</application>, use the following arguments:
288 </para>
289
290<screen><literal>CCARGS='-DNO_NIS -DUSE_TLS -I/usr/include/openssl/'
291AUXLIBS='-lssl -lcrypto'</literal></screen>
292 </sect4>
293
294 </sect3>
295
296 <sect3>
297 <title>Installing Postfix</title>
298
299 <para>
300 Adjust the following according to your needs. For example,
301 if you have <application>Cyrus SASL</application>,
302 install <application>Postfix</application> by running the following
303 commands:
304 </para>
305
306<screen><userinput>make CCARGS="-DNO_NIS -DUSE_TLS -I/usr/include/openssl/ \
307 -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \
308 AUXLIBS="-lssl -lcrypto -lsasl2" \
309 makefiles &amp;&amp;
310make</userinput></screen>
311
312 <!-- There is a testsuite, but it fails a lot. It seems to need
313 the host to be specifically setup for the tests.
314 Run with `make tests' and `make root_tests' -->
315 <para>
316 This package does not come with a useful test suite.
317 </para>
318
319 <para>
320 Now, as the <systemitem class="username">root</systemitem> user:
321 </para>
322
323<!-- dev note: sh postfix-install -non-interactive install_root=<DESTDIR> ... -->
324
325<screen role="root"><userinput>sh postfix-install -non-interactive \
326 daemon_directory=/usr/lib/postfix \
327 manpage_directory=/usr/share/man \
328 html_directory=/usr/share/doc/postfix-&postfix-version;/html \
329 readme_directory=/usr/share/doc/postfix-&postfix-version;/readme</userinput></screen>
330
331 </sect3>
332
333 </sect2>
334
335 <sect2 role="commands">
336 <title>Command Explanations</title>
337
338 <para>
339 <command>make makefiles</command>: This command rebuilds the makefiles
340 throughout the source tree to use the options contained in the
341 <envar>CCARGS</envar> and <envar>AUXLIBS</envar> variables.
342 </para>
343
344 <para>
345 <command>sh postfix-install -non-interactive</command>: This keeps the
346 install script from asking any questions, thereby accepting default
347 destination directories in all but the few cases. If the
348 <option>html_directory</option> and <option>readme_directory</option>
349 options are not set then the documentation will not be installed.
350 </para>
351
352 <para>
353 <option>CCARGS="-DNO_EAI ..."</option>: this will turn off SMTPUTF8
354 support, for example if the rest of your email address infrastructure
355 cannot handle UTF-8 email addresses and message header values.
356 </para>
357
358 </sect2>
359
360 <sect2 role="configuration">
361 <title>Configuring Postfix</title>
362
363 <sect3 id="postfix-config">
364 <title>Config Files</title>
365
366 <para>
367 <filename>/etc/aliases</filename>,
368 <filename>/etc/postfix/main.cf</filename>, and
369 <filename>/etc/postfix/master.cf</filename>
370 </para>
371
372 <indexterm zone="postfix postfix-config">
373 <primary sortas="e-etc-aliases">/etc/aliases</primary>
374 </indexterm>
375
376 <indexterm zone="postfix postfix-config">
377 <primary sortas="e-etc-postfix-star">/etc/postfix/*</primary>
378 </indexterm>
379
380 </sect3>
381
382 <sect3>
383 <title>Configuration Information</title>
384
385 <para>
386 Create (or append to an existing) <filename>/etc/aliases</filename>
387 with the following command. Change
388 <replaceable>&lt;LOGIN&gt;</replaceable> to your non-root login
389 identity so mail addressed to
390 <systemitem class="username">root</systemitem> can be forwarded to you.
391 As the <systemitem class="username">root</systemitem> user:
392 </para>
393
394<screen role="root"><userinput>cat &gt;&gt; /etc/aliases &lt;&lt; "EOF"
395<literal># Begin /etc/aliases
396
397MAILER-DAEMON: postmaster
398postmaster: root
399
400root: <replaceable>&lt;LOGIN&gt;</replaceable>
401# End /etc/aliases</literal>
402EOF</userinput></screen>
403
404 <para>
405 To protect an existing <filename>/etc/aliases</filename> file,
406 the above command appends these aliases to it if it exists. This file
407 should be checked and duplicate aliases removed, if present.
408 </para>
409
410 <note>
411 <para>
412 The <filename>/etc/postfix/main.cf</filename> and
413 <filename>/etc/postfix/master.cf</filename> files must be personalized
414 for your system. The <filename>main.cf</filename> file needs your
415 fully qualified hostname. You will find that
416 <filename>main.cf</filename> is self documenting, so load it into your
417 editor to make the changes you need for your situation.
418 </para>
419 </note>
420
421 <note>
422 <para>
423 <application>Postfix</application> can also be set up to
424 run in a chroot jail. See the file in the source
425 <filename>examples/chroot-setup/LINUX2</filename> for details.
426 </para>
427 </note>
428
429 <para>
430 If you have an existing configuration, you can run the
431 <command>postfix</command> utility to add any necessary definitions to
432 your existing files. As the
433 <systemitem class="username">root</systemitem> user:
434 </para>
435
436<screen role="nodump"><userinput>/usr/sbin/postfix upgrade-configuration</userinput></screen>
437
438 <para>
439 Before starting <application>Postfix</application>, you should check
440 that your configuration and file permissions will work properly. Run the
441 following commands as the <systemitem class="username">root</systemitem>
442 user to check and start your <application>Postfix</application> server:
443 </para>
444
445<screen role="nodump"><userinput>/usr/sbin/postfix check &amp;&amp;
446/usr/sbin/postfix start</userinput></screen>
447
448 </sect3>
449
450 <sect3 id="postfix-init">
451 <title><phrase revision="sysv">Boot Script</phrase>
452 <phrase revision="systemd">Systemd Unit</phrase></title>
453
454 <para>
455 To automate the running of Postfix at startup, install the
456 <phrase revision="sysv"><filename>/etc/rc.d/init.d/postfix</filename>
457 init script</phrase>
458 <phrase revision="systemd"><filename>postfix.service</filename>
459 unit</phrase> included in the
460 <xref linkend="bootscripts" revision="sysv"/>
461 <xref linkend="systemd-units" revision="systemd"/> package:
462 </para>
463
464 <indexterm zone="postfix postfix-init">
465 <primary sortas="f-postfix">postfix</primary>
466 </indexterm>
467
468<screen role="root"><userinput>make install-postfix</userinput></screen>
469
470 </sect3>
471
472 </sect2>
473
474 <sect2 role="content">
475 <title>Contents</title>
476
477 <segmentedlist>
478 <segtitle>Installed Programs</segtitle>
479 <segtitle>Installed Libraries</segtitle>
480 <segtitle>Installed Directories</segtitle>
481
482 <seglistitem>
483 <seg>
484 mailq (symlink), newaliases (symlink), postalias, postcat, postconf,
485 postdrop, postfix, postkick, postlock, postlog, postmap, postmulti,
486 postqueue, postsuper, and sendmail
487 </seg>
488 <seg>
489 None
490 </seg>
491 <seg>
492 /{etc,usr/lib}/postfix,
493 /usr/share/doc/postfix-&postfix-version; and
494 /var/{lib,spool}/postfix
495 </seg>
496 </seglistitem>
497 </segmentedlist>
498
499 <variablelist>
500 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
501 <?dbfo list-presentation="list"?>
502 <?dbhtml list-presentation="table"?>
503
504 <varlistentry id="mailq">
505 <term><command>mailq</command></term>
506 <listitem>
507 <para>
508 A symlink to <filename>sendmail</filename>
509 </para>
510 <indexterm zone="postfix mailq">
511 <primary sortas="b-mailq">mailq</primary>
512 </indexterm>
513 </listitem>
514 </varlistentry>
515
516 <varlistentry id="newaliases">
517 <term><command>newaliases</command></term>
518 <listitem>
519 <para>
520 A symlink to <filename>sendmail</filename>
521 </para>
522 <indexterm zone="postfix newaliases">
523 <primary sortas="b-newaliases">newaliases</primary>
524 </indexterm>
525 </listitem>
526 </varlistentry>
527
528 <varlistentry id="postalias">
529 <term><command>postalias</command></term>
530 <listitem>
531 <para>
532 is a utility for <application>Postfix</application> alias database
533 maintenance
534 </para>
535 <indexterm zone="postfix postalias">
536 <primary sortas="b-postalias">postalias</primary>
537 </indexterm>
538 </listitem>
539 </varlistentry>
540
541 <varlistentry id="postcat">
542 <term><command>postcat</command></term>
543 <listitem>
544 <para>
545 Prints the contents of files from the
546 <application>Postfix</application> queue in human readable format
547 </para>
548 <indexterm zone="postfix postcat">
549 <primary sortas="b-postcat">postcat</primary>
550 </indexterm>
551 </listitem>
552 </varlistentry>
553
554 <varlistentry id="postconf">
555 <term><command>postconf</command></term>
556 <listitem>
557 <para>
558 Displays or changes the value of
559 <application>Postfix</application> configuration parameters
560 </para>
561 <indexterm zone="postfix postconf">
562 <primary sortas="b-postconf">postconf</primary>
563 </indexterm>
564 </listitem>
565 </varlistentry>
566
567 <varlistentry id="postdrop">
568 <term><command>postdrop</command></term>
569 <listitem>
570 <para>
571 Creates a file in the maildrop directory and copies its standard
572 input to the file
573 </para>
574 <indexterm zone="postfix postdrop">
575 <primary sortas="b-postdrop">postdrop</primary>
576 </indexterm>
577 </listitem>
578 </varlistentry>
579
580 <varlistentry id="postfix-bin">
581 <term><command>postfix</command></term>
582 <listitem>
583 <para>
584 is the <application>Postfix</application> control program
585 </para>
586 <indexterm zone="postfix postfix-bin">
587 <primary sortas="b-postfix">postfix</primary>
588 </indexterm>
589 </listitem>
590 </varlistentry>
591
592 <varlistentry id="postkick">
593 <term><command>postkick</command></term>
594 <listitem>
595 <para>
596 Sends requests to the specified service over a local transport
597 channel
598 </para>
599 <indexterm zone="postfix postkick">
600 <primary sortas="b-postkick">postkick</primary>
601 </indexterm>
602 </listitem>
603 </varlistentry>
604
605 <varlistentry id="postlock">
606 <term><command>postlock</command></term>
607 <listitem>
608 <para>
609 Locks a mail folder for exclusive use, and executes commands passed
610 to it
611 </para>
612 <indexterm zone="postfix postlock">
613 <primary sortas="b-postlock">postlock</primary>
614 </indexterm>
615 </listitem>
616 </varlistentry>
617
618 <varlistentry id="postlog">
619 <term><command>postlog</command></term>
620 <listitem>
621 <para>
622 A <application>Postfix</application>-compatible logging interface
623 for use in, for example, shell scripts
624 </para>
625 <indexterm zone="postfix postlog">
626 <primary sortas="b-postlog">postlog</primary>
627 </indexterm>
628 </listitem>
629 </varlistentry>
630
631 <varlistentry id="postmap">
632 <term><command>postmap</command></term>
633 <listitem>
634 <para>
635 Creates or queries one or more Postfix lookup tables, or updates an
636 existing one
637 </para>
638 <indexterm zone="postfix postmap">
639 <primary sortas="b-postmap">postmap</primary>
640 </indexterm>
641 </listitem>
642 </varlistentry>
643
644 <varlistentry id="postmulti">
645 <term><command>postmulti</command></term>
646 <listitem>
647 <para>
648 is the <application>Postfix</application> multi-instance manager.
649 It allows a system administrator to manage multiple
650 <application>Postfix</application> instances on a single host
651 </para>
652 <indexterm zone="postfix postmulti">
653 <primary sortas="b-postmulti">postmulti</primary>
654 </indexterm>
655 </listitem>
656 </varlistentry>
657
658 <varlistentry id="postqueue">
659 <term><command>postqueue</command></term>
660 <listitem>
661 <para>
662 The <application>Postfix</application> user interface for
663 queue management
664 </para>
665 <indexterm zone="postfix postqueue">
666 <primary sortas="b-postqueue">postqueue</primary>
667 </indexterm>
668 </listitem>
669 </varlistentry>
670
671 <varlistentry id="postsuper">
672 <term><command>postsuper</command></term>
673 <listitem>
674 <para>
675 The <application>Postfix</application> user interface for
676 superuser queue management
677 </para>
678 <indexterm zone="postfix postsuper">
679 <primary sortas="b-postsuper">postsuper</primary>
680 </indexterm>
681 </listitem>
682 </varlistentry>
683
684 <varlistentry id="sendmail-postfix">
685 <term><command>sendmail</command></term>
686 <listitem>
687 <para>
688 is the <application>Postfix</application> to
689 <application>Sendmail</application> compatibility interface
690 </para>
691 <indexterm zone="postfix sendmail-postfix">
692 <primary sortas="b-sendmail">sendmail</primary>
693 </indexterm>
694 </listitem>
695 </varlistentry>
696
697 </variablelist>
698
699 </sect2>
700
701</sect1>
Note: See TracBrowser for help on using the repository browser.