source: server/mail/postfix.xml@ 2a8af5f

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.0 9.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 upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 2a8af5f was ddbaa48, checked in by Ken Moffat <ken@…>, 5 years ago

Fix postfix FTBFS with glibc-2.30.

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

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