source: server/mail/postfix.xml@ 81076bb6

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.4 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 81076bb6 was 81076bb6, checked in by Bruce Dubbs <bdubbs@…>, 5 years ago

Tags for networking and postscript.
Archive two unused files.

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

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