source: server/mail/postfix.xml@ 66d551c

10.1 11.0 11.1 11.2 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 upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 66d551c was 66d551c, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Tag a lot of utilities and libraries

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

  • Property mode set to 100644
File size: 21.6 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 "a4d1b2df03a500cf8f9759d5fca1c1f6">
10 <!ENTITY postfix-size "4.4 MB">
11 <!ENTITY postfix-buildsize "220 MB">
12 <!ENTITY postfix-time "0.2 SBU (Using parallelism=4)">
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 &lfs101_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>
280 If you have <application>Cyrus SASL</application> and
281 <application>OpenSSL</application> installed, install
282 <application>Postfix</application> by running the following commands:
283 </para>
284
285<screen><userinput>make CCARGS="-DUSE_TLS -I/usr/include/openssl/ \
286 -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \
287 AUXLIBS="-lssl -lcrypto -lsasl2" \
288 makefiles &amp;&amp;
289make</userinput></screen>
290
291 <!-- There is a testsuite, but it fails a lot. It seems to need
292 the host to be specifically setup for the tests.
293 Run with `make tests' and `make root_tests' -->
294 <para>
295 This package does not come with a useful test suite.
296 </para>
297
298 <para>
299 Now, as the <systemitem class="username">root</systemitem> user:
300 </para>
301
302<!-- dev note: sh postfix-install -non-interactive install_root=<DESTDIR> ... -->
303
304<screen role="root"><userinput>sh postfix-install -non-interactive \
305 daemon_directory=/usr/lib/postfix \
306 manpage_directory=/usr/share/man \
307 html_directory=/usr/share/doc/postfix-&postfix-version;/html \
308 readme_directory=/usr/share/doc/postfix-&postfix-version;/readme</userinput></screen>
309
310 </sect3>
311
312 </sect2>
313
314 <sect2 role="commands">
315 <title>Command Explanations</title>
316
317 <para>
318 <command>make makefiles</command>: This command rebuilds the makefiles
319 throughout the source tree to use the options contained in the
320 <envar>CCARGS</envar> and <envar>AUXLIBS</envar> variables.
321 </para>
322
323 <para>
324 <command>sh postfix-install -non-interactive</command>: This keeps the
325 install script from asking any questions, thereby accepting default
326 destination directories in all but the few cases. If the
327 <option>html_directory</option> and <option>readme_directory</option>
328 options are not set then the documentation will not be installed.
329 </para>
330
331 <para>
332 <option>CCARGS="-DNO_EAI ..."</option>: this will turn off SMTPUTF8
333 support, for example if the rest of your email address infrastructure
334 cannot handle UTF-8 email addresses and message header values.
335 </para>
336
337 </sect2>
338
339 <sect2 role="configuration">
340 <title>Configuring Postfix</title>
341
342 <sect3 id="postfix-config">
343 <title>Config Files</title>
344
345 <para>
346 <filename>/etc/aliases</filename>,
347 <filename>/etc/postfix/main.cf</filename>, and
348 <filename>/etc/postfix/master.cf</filename>
349 </para>
350
351 <indexterm zone="postfix postfix-config">
352 <primary sortas="e-etc-aliases">/etc/aliases</primary>
353 </indexterm>
354
355 <indexterm zone="postfix postfix-config">
356 <primary sortas="e-etc-postfix-star">/etc/postfix/*</primary>
357 </indexterm>
358
359 </sect3>
360
361 <sect3>
362 <title>Configuration Information</title>
363
364 <para>
365 Create (or append to an existing) <filename>/etc/aliases</filename>
366 with the following command. Change
367 <replaceable>&lt;LOGIN&gt;</replaceable> for your non-root login
368 identity so mail addressed to
369 <systemitem class="username">root</systemitem> can be forwarded to you.
370 As the <systemitem class="username">root</systemitem> user:
371 </para>
372
373<screen role="root"><userinput>cat &gt;&gt; /etc/aliases &lt;&lt; "EOF"
374<literal># Begin /etc/aliases
375
376MAILER-DAEMON: postmaster
377postmaster: root
378
379root: <replaceable>&lt;LOGIN&gt;</replaceable>
380# End /etc/aliases</literal>
381EOF</userinput></screen>
382
383 <para>
384 To protect an existing <filename>/etc/aliases</filename> file,
385 the above command appends these aliases to it if it exists. This file
386 should be checked and duplicate aliases removed, if present.
387 </para>
388
389 <note>
390 <para>
391 The <filename>/etc/postfix/main.cf</filename> and
392 <filename>/etc/postfix/master.cf</filename> files must be personalized
393 for your system. The <filename>main.cf</filename> file needs your
394 fully qualified hostname. You will find that
395 <filename>main.cf</filename> is self documenting, so load it into your
396 editor to make the changes you need for your situation.
397 </para>
398 </note>
399
400 <note>
401 <para>
402 <application>Postfix</application> can also be set up to
403 run in a chroot jail. See the file in the source
404 <filename>examples/chroot-setup/LINUX2</filename> for details.
405 </para>
406 </note>
407
408 <para>
409 If you have an existing configuration, you can run the
410 <command>postfix</command> utility to add any necessary definitions to
411 your existing files. As the
412 <systemitem class="username">root</systemitem> user:
413 </para>
414
415<screen role="root"><userinput>/usr/sbin/postfix upgrade-configuration</userinput></screen>
416
417 <para>
418 Before starting <application>Postfix</application>, you should check
419 that your configuration and file permissions will work properly. Run the
420 following commands as the <systemitem class="username">root</systemitem>
421 user to check and start your <application>Postfix</application> server:
422 </para>
423
424<screen role="root"><userinput>/usr/sbin/postfix check &amp;&amp;
425/usr/sbin/postfix start</userinput></screen>
426
427 </sect3>
428
429 <sect3 id="postfix-init">
430 <title><phrase revision="sysv">Boot Script</phrase>
431 <phrase revision="systemd">Systemd Unit</phrase></title>
432
433 <para>
434 To automate the running of Postfix at startup, install the
435 <phrase revision="sysv"><filename>/etc/rc.d/init.d/postfix</filename>
436 init script</phrase>
437 <phrase revision="systemd"><filename>postfix.service</filename>
438 unit</phrase> included in the
439 <xref linkend="bootscripts" revision="sysv"/>
440 <xref linkend="systemd-units" revision="systemd"/> package:
441 </para>
442
443 <indexterm zone="postfix postfix-init">
444 <primary sortas="f-postfix">postfix</primary>
445 </indexterm>
446
447<screen role="root"><userinput>make install-postfix</userinput></screen>
448
449 </sect3>
450
451 </sect2>
452
453 <sect2 role="content">
454 <title>Contents</title>
455
456 <segmentedlist>
457 <segtitle>Installed Programs</segtitle>
458 <segtitle>Installed Libraries</segtitle>
459 <segtitle>Installed Directories</segtitle>
460
461 <seglistitem>
462 <seg>
463 mailq (symlink), newaliases (symlink), postalias, postcat, postconf,
464 postdrop, postfix, postkick, postlock, postlog, postmap, postmulti,
465 postqueue, postsuper, and sendmail
466 </seg>
467 <seg>
468 None
469 </seg>
470 <seg>
471 /{etc,usr/lib}/postfix,
472 /usr/share/doc/postfix-&postfix-version; and
473 /var/{lib,spool}/postfix
474 </seg>
475 </seglistitem>
476 </segmentedlist>
477
478 <variablelist>
479 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
480 <?dbfo list-presentation="list"?>
481 <?dbhtml list-presentation="table"?>
482
483 <varlistentry id="mailq">
484 <term><command>mailq</command></term>
485 <listitem>
486 <para>
487 A symlink to <filename>sendmail</filename>
488 </para>
489 <indexterm zone="postfix mailq">
490 <primary sortas="b-mailq">mailq</primary>
491 </indexterm>
492 </listitem>
493 </varlistentry>
494
495 <varlistentry id="newaliases">
496 <term><command>newaliases</command></term>
497 <listitem>
498 <para>
499 A symlink to <filename>sendmail</filename>
500 </para>
501 <indexterm zone="postfix newaliases">
502 <primary sortas="b-newaliases">newaliases</primary>
503 </indexterm>
504 </listitem>
505 </varlistentry>
506
507 <varlistentry id="postalias">
508 <term><command>postalias</command></term>
509 <listitem>
510 <para>
511 is a utility for <application>Postfix</application> alias database
512 maintenance
513 </para>
514 <indexterm zone="postfix postalias">
515 <primary sortas="b-postalias">postalias</primary>
516 </indexterm>
517 </listitem>
518 </varlistentry>
519
520 <varlistentry id="postcat">
521 <term><command>postcat</command></term>
522 <listitem>
523 <para>
524 Prints the contents of files from the
525 <application>Postfix</application> queue in human readable format
526 </para>
527 <indexterm zone="postfix postcat">
528 <primary sortas="b-postcat">postcat</primary>
529 </indexterm>
530 </listitem>
531 </varlistentry>
532
533 <varlistentry id="postconf">
534 <term><command>postconf</command></term>
535 <listitem>
536 <para>
537 Displays or changes the value of
538 <application>Postfix</application> configuration parameters
539 </para>
540 <indexterm zone="postfix postconf">
541 <primary sortas="b-postconf">postconf</primary>
542 </indexterm>
543 </listitem>
544 </varlistentry>
545
546 <varlistentry id="postdrop">
547 <term><command>postdrop</command></term>
548 <listitem>
549 <para>
550 Creates a file in the maildrop directory and copies its standard
551 input to the file
552 </para>
553 <indexterm zone="postfix postdrop">
554 <primary sortas="b-postdrop">postdrop</primary>
555 </indexterm>
556 </listitem>
557 </varlistentry>
558
559 <varlistentry id="postfix-bin">
560 <term><command>postfix</command></term>
561 <listitem>
562 <para>
563 is the <application>Postfix</application> control program
564 </para>
565 <indexterm zone="postfix postfix-bin">
566 <primary sortas="b-postfix">postfix</primary>
567 </indexterm>
568 </listitem>
569 </varlistentry>
570
571 <varlistentry id="postkick">
572 <term><command>postkick</command></term>
573 <listitem>
574 <para>
575 Sends requests to the specified service over a local transport
576 channel
577 </para>
578 <indexterm zone="postfix postkick">
579 <primary sortas="b-postkick">postkick</primary>
580 </indexterm>
581 </listitem>
582 </varlistentry>
583
584 <varlistentry id="postlock">
585 <term><command>postlock</command></term>
586 <listitem>
587 <para>
588 Locks a mail folder for exclusive use, and executes commands passed
589 to it
590 </para>
591 <indexterm zone="postfix postlock">
592 <primary sortas="b-postlock">postlock</primary>
593 </indexterm>
594 </listitem>
595 </varlistentry>
596
597 <varlistentry id="postlog">
598 <term><command>postlog</command></term>
599 <listitem>
600 <para>
601 A <application>Postfix</application>-compatible logging interface
602 for use in, for example, shell scripts
603 </para>
604 <indexterm zone="postfix postlog">
605 <primary sortas="b-postlog">postlog</primary>
606 </indexterm>
607 </listitem>
608 </varlistentry>
609
610 <varlistentry id="postmap">
611 <term><command>postmap</command></term>
612 <listitem>
613 <para>
614 Creates or queries one or more Postfix lookup tables, or updates an
615 existing one
616 </para>
617 <indexterm zone="postfix postmap">
618 <primary sortas="b-postmap">postmap</primary>
619 </indexterm>
620 </listitem>
621 </varlistentry>
622
623 <varlistentry id="postmulti">
624 <term><command>postmulti</command></term>
625 <listitem>
626 <para>
627 is the <application>Postfix</application> multi-instance manager.
628 It allows a system administrator to manage multiple
629 <application>Postfix</application> instances on a single host
630 </para>
631 <indexterm zone="postfix postmulti">
632 <primary sortas="b-postmulti">postmulti</primary>
633 </indexterm>
634 </listitem>
635 </varlistentry>
636
637 <varlistentry id="postqueue">
638 <term><command>postqueue</command></term>
639 <listitem>
640 <para>
641 The <application>Postfix</application> user interface for
642 queue management
643 </para>
644 <indexterm zone="postfix postqueue">
645 <primary sortas="b-postqueue">postqueue</primary>
646 </indexterm>
647 </listitem>
648 </varlistentry>
649
650 <varlistentry id="postsuper">
651 <term><command>postsuper</command></term>
652 <listitem>
653 <para>
654 The <application>Postfix</application> user interface for
655 superuser queue management
656 </para>
657 <indexterm zone="postfix postsuper">
658 <primary sortas="b-postsuper">postsuper</primary>
659 </indexterm>
660 </listitem>
661 </varlistentry>
662
663 <varlistentry id="sendmail-postfix">
664 <term><command>sendmail</command></term>
665 <listitem>
666 <para>
667 is the <application>Postfix</application> to
668 <application>Sendmail</application> compatibility interface
669 </para>
670 <indexterm zone="postfix sendmail-postfix">
671 <primary sortas="b-sendmail">sendmail</primary>
672 </indexterm>
673 </listitem>
674 </varlistentry>
675
676 </variablelist>
677
678 </sect2>
679
680</sect1>
Note: See TracBrowser for help on using the repository browser.