source: server/mail/postfix.xml@ b400d26

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt nosym perl-modules 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 b400d26 was b400d26, checked in by Fernando de Oliveira <fernando@…>, 9 years ago

Update to postfix-3.0.0.

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

  • Property mode set to 100644
File size: 20.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
9 "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-&postfix-version;.tar.gz">
10 <!ENTITY postfix-md5sum "a4a83f8d729f31c803bf9c2277701d56">
11 <!ENTITY postfix-size "4.1 MB">
12 <!ENTITY postfix-buildsize "159 MB">
13 <!ENTITY postfix-time "0.4 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 &lfs76_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">Recommended</bridgehead>
80 <para role="recommended">
81 <xref linkend="db"/>,
82 <xref linkend="cyrus-sasl"/>, and
83 <xref linkend="openssl"/>
84 </para>
85
86 <bridgehead renderas="sect4">Optional</bridgehead>
87 <para role="optional">
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
156 <sect4>
157 <title>Cyrus-SASL</title>
158
159 <para>
160 To use <application>Cyrus-SASL</application> with
161 <application>Postfix</application>, use the following arguments:
162 </para>
163
164<screen><literal>CCARGS='-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl'
165AUXLIBS='-lsasl2'</literal></screen>
166
167 </sect4>
168
169 <sect4>
170 <title>OpenLDAP</title>
171
172 <para>
173 To use <application>OpenLDAP</application> with
174 <application>Postfix</application>, use the following arguments:
175 </para>
176
177<screen><literal>CCARGS='-DHAS_LDAP'
178AUXLIBS='-lldap -llber'</literal></screen>
179
180 </sect4>
181
182 <sect4>
183 <title>Sqlite</title>
184
185 <para>
186 To use <application>Sqlite</application> with
187 <application>Postfix</application>, use the following arguments:
188 </para>
189
190<screen><literal>CCARGS='-DHAS_SQLITE'
191AUXLIBS='-lsqlite3 -lpthread'</literal></screen>
192
193 </sect4>
194
195 <sect4>
196 <title>MySQL</title>
197
198 <para>
199 To use <application>MySQL</application> with
200 <application>Postfix</application>, use the following arguments:
201 </para>
202
203<screen><literal>CCARGS='-DHAS_MYSQL -I/usr/include/mysql'
204AUXLIBS='-lmysqlclient -lz -lm'</literal></screen>
205
206 </sect4>
207
208 <sect4>
209 <title>PostgreSQL</title>
210
211 <para>
212 To use <application>PostgreSQL</application> with
213 <application>Postfix</application>, use the following arguments:
214 </para>
215
216<screen><literal>CCARGS='-DHAS_PGSQL -I/usr/include/postgresql'
217AUXLIBS='-lpq -lz -lm'</literal></screen>
218
219 </sect4>
220
221 <sect4>
222 <title>CDB/TinyCDB</title>
223
224 <para>
225 To use <application>CDB</application> or
226 <application>TinyCDB</application> with
227 <application>Postfix</application>, use the following arguments:
228 </para>
229
230<screen><literal>CCARGS='-DHAS_CDB'
231AUXLIBS='<replaceable>&lt;/path/to/CDB&gt;</replaceable>/libcdb.a'</literal></screen>
232
233 </sect4>
234
235 <sect4>
236 <title>StartTLS Authentication</title>
237
238 <para>
239 To use <application>OpenSSL</application> with
240 <application>Postfix</application>, use the following arguments:
241 </para>
242
243<screen><literal>CCARGS='-DUSE_TLS -I/usr/include/openssl/'
244AUXLIBS='-lssl -lcrypto'</literal></screen>
245 </sect4>
246
247 </sect3>
248
249 <sect3>
250 <title>Installing Postfix</title>
251
252 <para>
253 If you have <application>Cyrus SASL</application> and
254 <application>OpenSSL</application> installed, install
255 <application>Postfix</application> by running the following commands:
256 </para>
257
258<screen><userinput>make CCARGS="-DUSE_TLS -I/usr/include/openssl/ \
259 -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \
260 AUXLIBS="-lssl -lcrypto -lsasl2" \
261 makefiles &amp;&amp;
262make</userinput></screen>
263
264 <!-- There is a testsuite, but it fails a lot. It seems to need
265 the host to be specifically setup for the tests.
266 Run with `make tests' and `make root_tests' -->
267 <para>
268 This package does not come with a useful test suite.
269 </para>
270
271 <para>
272 Now, as the <systemitem class="username">root</systemitem> user:
273 </para>
274
275<!-- dev note: sh postfix-install -non-interactive install_root=<DESTDIR> ... -->
276
277<screen role="root"><userinput>sh postfix-install -non-interactive \
278 daemon_directory=/usr/lib/postfix \
279 manpage_directory=/usr/share/man \
280 html_directory=/usr/share/doc/postfix-&postfix-version;/html \
281 readme_directory=/usr/share/doc/postfix-&postfix-version;/readme</userinput></screen>
282
283 </sect3>
284
285 </sect2>
286
287 <sect2 role="commands">
288 <title>Command Explanations</title>
289
290 <para>
291 <command>make makefiles</command>: This command rebuilds the makefiles
292 throughout the source tree to use the options contained in the
293 <envar>CCARGS</envar> and <envar>AUXLIBS</envar> variables.
294 </para>
295
296 <para>
297 <command>sh postfix-install -non-interactive</command>: This keeps the
298 install script from asking any questions, thereby accepting default
299 destination directories in all but the few cases. If the
300 <option>html_directory</option> and <option>readme_directory</option>
301 options are not set then the documentation will not be installed.
302 </para>
303
304 </sect2>
305
306 <sect2 role="configuration">
307 <title>Configuring Postfix</title>
308
309 <sect3 id="postfix-config">
310 <title>Config Files</title>
311
312 <para>
313 <filename>/etc/aliases</filename>,
314 <filename>/etc/postfix/main.cf</filename>, and
315 <filename>/etc/postfix/master.cf</filename>
316 </para>
317
318 <indexterm zone="postfix postfix-config">
319 <primary sortas="e-etc-aliases">/etc/aliases</primary>
320 </indexterm>
321
322 <indexterm zone="postfix postfix-config">
323 <primary sortas="e-etc-postfix-star">/etc/postfix/*</primary>
324 </indexterm>
325
326 </sect3>
327
328 <sect3>
329 <title>Configuration Information</title>
330
331 <para>
332 Create (or append to an existing) <filename>/etc/aliases</filename>
333 with the following command. Change
334 <replaceable>&lt;LOGIN&gt;</replaceable> for your non-root login
335 identity so mail addressed to
336 <systemitem class="username">root</systemitem> can be forwarded to you.
337 As the <systemitem class="username">root</systemitem> user:
338 </para>
339
340<screen role="root"><userinput>cat &gt;&gt; /etc/aliases &lt;&lt; "EOF"
341<literal># Begin /etc/aliases
342
343MAILER-DAEMON: postmaster
344postmaster: root
345
346root: <replaceable>&lt;LOGIN&gt;</replaceable>
347# End /etc/aliases</literal>
348EOF</userinput></screen>
349
350 <para>
351 To protect an existing <filename>/etc/aliases</filename> file,
352 the above command appends these aliases to it if it exists. This file
353 should be checked and duplicate aliases removed, if present.
354 </para>
355
356 <note>
357 <para>
358 The <filename>/etc/postfix/main.cf</filename> and
359 <filename>/etc/postfix/master.cf</filename> files must be personalized
360 for your system. The <filename>main.cf</filename> file needs your
361 fully qualified hostname. You will find that
362 <filename>main.cf</filename> is self documenting, so load it into your
363 editor to make the changes you need for your situation.
364 </para>
365 </note>
366
367 <note>
368 <para>
369 <application>Postfix</application> can also be set up to
370 run in a chroot jail. See the file in the source
371 <filename>examples/chroot-setup/LINUX2</filename> for details.
372 </para>
373 </note>
374
375 <para>
376 If you have an existing configuration, you can run the
377 <command>postfix</command> utility to add any necessary definitions to
378 your existing files. As the
379 <systemitem class="username">root</systemitem> user:
380 </para>
381
382<screen role="root"><userinput>/usr/sbin/postfix upgrade-configuration</userinput></screen>
383
384 <para>
385 Before starting <application>Postfix</application>, you should check
386 that your configuration and file permissions will work properly. Run the
387 following commands as the <systemitem class="username">root</systemitem>
388 user to check and start your <application>Postfix</application> server:
389 </para>
390
391<screen role="root"><userinput>/usr/sbin/postfix check &amp;&amp;
392/usr/sbin/postfix start</userinput></screen>
393
394 </sect3>
395
396 <sect3 id="postfix-init">
397 <title>Boot Script</title>
398
399 <para>
400 To automate the running of Postfix at startup, install the
401 <filename>/etc/rc.d/init.d/postfix</filename> init script included in
402 the <xref linkend="bootscripts"/> package.
403 </para>
404
405 <indexterm zone="postfix postfix-init">
406 <primary sortas="f-postfix">postfix</primary>
407 </indexterm>
408
409<screen role="root"><userinput>make install-postfix</userinput></screen>
410
411 </sect3>
412
413 </sect2>
414
415 <sect2 role="content">
416 <title>Contents</title>
417
418 <segmentedlist>
419 <segtitle>Installed Programs</segtitle>
420 <segtitle>Installed Libraries</segtitle>
421 <segtitle>Installed Directories</segtitle>
422
423 <seglistitem>
424 <seg>
425 mailq, newaliases, postalias, postcat, postconf, postdrop, postfix,
426 postkick, postlock, postlog, postmap, postmulti, postqueue, postsuper,
427 and sendmail
428 </seg>
429 <seg>
430 None
431 </seg>
432 <seg>
433 /etc/postfix,
434 /usr/lib/postfix,
435 /usr/share/doc/postfix-&postfix-version;,
436 /var/lib/postfix, and
437 /var/spool/postfix
438 </seg>
439 </seglistitem>
440 </segmentedlist>
441
442 <variablelist>
443 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
444 <?dbfo list-presentation="list"?>
445 <?dbhtml list-presentation="table"?>
446
447 <varlistentry id="mailq">
448 <term><command>mailq</command></term>
449 <listitem>
450 <para>
451 A symlink to <filename>sendmail</filename>.
452 </para>
453 <indexterm zone="postfix mailq">
454 <primary sortas="b-mailq">mailq</primary>
455 </indexterm>
456 </listitem>
457 </varlistentry>
458
459 <varlistentry id="newaliases">
460 <term><command>newaliases</command></term>
461 <listitem>
462 <para>
463 A symlink to <filename>sendmail</filename>.
464 </para>
465 <indexterm zone="postfix newaliases">
466 <primary sortas="b-newaliases">newaliases</primary>
467 </indexterm>
468 </listitem>
469 </varlistentry>
470
471 <varlistentry id="postalias">
472 <term><command>postalias</command></term>
473 <listitem>
474 <para>
475 is a utility for <application>Postfix</application> alias database
476 maintenance
477 </para>
478 <indexterm zone="postfix postalias">
479 <primary sortas="b-postalias">postalias</primary>
480 </indexterm>
481 </listitem>
482 </varlistentry>
483
484 <varlistentry id="postcat">
485 <term><command>postcat</command></term>
486 <listitem>
487 <para>
488 Prints the contents of files from the
489 <application>Postfix</application> queue in human readable format.
490 </para>
491 <indexterm zone="postfix postcat">
492 <primary sortas="b-postcat">postcat</primary>
493 </indexterm>
494 </listitem>
495 </varlistentry>
496
497 <varlistentry id="postconf">
498 <term><command>postconf</command></term>
499 <listitem>
500 <para>
501 Displays or changes the value of
502 <application>Postfix</application> configuration parameters.
503 </para>
504 <indexterm zone="postfix postconf">
505 <primary sortas="b-postconf">postconf</primary>
506 </indexterm>
507 </listitem>
508 </varlistentry>
509
510 <varlistentry id="postdrop">
511 <term><command>postdrop</command></term>
512 <listitem>
513 <para>
514 Creates a file in the maildrop directory and copies its standard
515 input to the file.
516 </para>
517 <indexterm zone="postfix postdrop">
518 <primary sortas="b-postdrop">postdrop</primary>
519 </indexterm>
520 </listitem>
521 </varlistentry>
522
523 <varlistentry id="postfix-bin">
524 <term><command>postfix</command></term>
525 <listitem>
526 <para>
527 is the <application>Postfix</application> control program.
528 </para>
529 <indexterm zone="postfix postfix-bin">
530 <primary sortas="b-postfix">postfix</primary>
531 </indexterm>
532 </listitem>
533 </varlistentry>
534
535 <varlistentry id="postkick">
536 <term><command>postkick</command></term>
537 <listitem>
538 <para>
539 Sends requests to the specified service over a local transport
540 channel.
541 </para>
542 <indexterm zone="postfix postkick">
543 <primary sortas="b-postkick">postkick</primary>
544 </indexterm>
545 </listitem>
546 </varlistentry>
547
548 <varlistentry id="postlock">
549 <term><command>postlock</command></term>
550 <listitem>
551 <para>
552 Locks a mail folder for exclusive use, and executes commands passed
553 to it.
554 </para>
555 <indexterm zone="postfix postlock">
556 <primary sortas="b-postlock">postlock</primary>
557 </indexterm>
558 </listitem>
559 </varlistentry>
560
561 <varlistentry id="postlog">
562 <term><command>postlog</command></term>
563 <listitem>
564 <para>
565 A <application>Postfix</application>-compatible logging interface
566 for use in, for example, shell scripts.
567 </para>
568 <indexterm zone="postfix postlog">
569 <primary sortas="b-postlog">postlog</primary>
570 </indexterm>
571 </listitem>
572 </varlistentry>
573
574 <varlistentry id="postmap">
575 <term><command>postmap</command></term>
576 <listitem>
577 <para>
578 Creates or queries one or more Postfix lookup tables, or updates an
579 existing one.
580 </para>
581 <indexterm zone="postfix postmap">
582 <primary sortas="b-postmap">postmap</primary>
583 </indexterm>
584 </listitem>
585 </varlistentry>
586
587 <varlistentry id="postmulti">
588 <term><command>postmulti</command></term>
589 <listitem>
590 <para>
591 is the <application>Postfix</application> multi-instance manager.
592 It allows a system administrator to manage multiple
593 <application>Postfix</application> instances on a single host.
594 </para>
595 <indexterm zone="postfix postmulti">
596 <primary sortas="b-postmulti">postmulti</primary>
597 </indexterm>
598 </listitem>
599 </varlistentry>
600
601 <varlistentry id="postqueue">
602 <term><command>postqueue</command></term>
603 <listitem>
604 <para>
605 The <application>Postfix</application> user interface for
606 queue management.
607 </para>
608 <indexterm zone="postfix postqueue">
609 <primary sortas="b-postqueue">postqueue</primary>
610 </indexterm>
611 </listitem>
612 </varlistentry>
613
614 <varlistentry id="postsuper">
615 <term><command>postsuper</command></term>
616 <listitem>
617 <para>
618 The <application>Postfix</application> user interface for
619 superuser queue management.
620 </para>
621 <indexterm zone="postfix postsuper">
622 <primary sortas="b-postsuper">postsuper</primary>
623 </indexterm>
624 </listitem>
625 </varlistentry>
626
627 <varlistentry id="sendmail-postfix">
628 <term><command>sendmail</command></term>
629 <listitem>
630 <para>
631 is the <application>Postfix</application> to
632 <application>Sendmail</application> compatibility interface.
633 </para>
634 <indexterm zone="postfix sendmail-postfix">
635 <primary sortas="b-sendmail">sendmail</primary>
636 </indexterm>
637 </listitem>
638 </varlistentry>
639
640 </variablelist>
641
642 </sect2>
643
644</sect1>
Note: See TracBrowser for help on using the repository browser.