source: server/mail/postfix.xml@ 405c8dc

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 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 gimp3 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/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 405c8dc was 405c8dc, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

LFS-7.3 tags thanks to Thoms Trepl

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

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