source: server/mail/postfix.xml@ 3df190fb

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 3df190fb was 3df190fb, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Added a note to postfix on where to find instructions for
running in a chroot jail.

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

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