source: server/mail/postfix.xml@ b8bc70d

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.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 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 b8bc70d was b8bc70d, checked in by Bruce Dubbs <bdubbs@…>, 6 years ago

Update to QupZilla-2.2.5.
Update to libevdev-1.5.8.
Update to postfix-3.2.5.
Update to gc-7.6.4.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@19713 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 <!ENTITY postfix-download-ftp "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-&postfix-version;.tar.gz">
9 <!ENTITY postfix-md5sum "d32f51b7178b12a87f2ac249e376ad38">
10 <!ENTITY postfix-size "4.2 MB">
11 <!ENTITY postfix-buildsize "182 MB">
12 <!ENTITY postfix-time "0.5 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 &lfs81_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"/>,
82 <xref linkend="libnsl"/>, and
83 <xref linkend="openssl"/>
84 </para>
85
86 <bridgehead renderas="sect4">Optional</bridgehead>
87 <para role="optional">
88 <xref linkend="icu"/> for Email Address Internationalization (SMTPUTF8) support,
89 <xref linkend="mariadb"/> or <ulink url="http://www.mysql.com/">MySQL</ulink>,
90 <xref linkend="openldap"/>,
91 <xref linkend="pcre"/>,
92 <xref linkend="postgresql"/>,
93 <xref linkend="sqlite"/>, 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
116 <para>
117 Before you compile the program, you need to create users and groups that
118 will be expected to be in place during the installation. Add the users
119 and groups with the following commands issued by the
120 <systemitem class="username">root</systemitem> user:
121 </para>
122
123<screen role="root"><userinput>groupadd -g 32 postfix &amp;&amp;
124groupadd -g 33 postdrop &amp;&amp;
125useradd -c "Postfix Daemon User" -d /var/spool/postfix -g postfix \
126 -s /bin/false -u 32 postfix &amp;&amp;
127chown -v postfix:postfix /var/mail</userinput></screen>
128 </sect3>
129
130 <sect3>
131 <title>Configuring the Build</title>
132
133 <para>
134 The README files are formatted to be read with a pager like
135 <application>Less</application> or <application>More</application>.
136 If you want to use a text editor, make them legible with the
137 following sed:
138 </para>
139
140<screen><userinput>sed -i 's/.\x08//g' README_FILES/*</userinput></screen>
141
142 <para>
143 The <application>Postfix</application> source tree does not contain a
144 <filename>configure</filename> script, rather the makefile in the
145 top-level directory contains a <option>makefiles</option> target that
146 regenerates all the other makefiles in the build tree. If you wish to
147 use additional software such as a database back-end for virtual users,
148 or TLS/SSL authentication, you will need to regenerate the makefiles
149 using one or more of the appropriate <envar>CCARGS</envar> and
150 <envar>AUXLIBS</envar> settings listed below.
151 </para>
152
153 <para>
154 For more details read the readme files.
155 </para>
156
157 <sect4>
158 <title>Cyrus-SASL</title>
159
160 <para>
161 To use <application>Cyrus-SASL</application> with
162 <application>Postfix</application>, use the following arguments:
163 </para>
164
165<screen><literal>CCARGS='-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl'
166AUXLIBS='-lsasl2'</literal></screen>
167
168 </sect4>
169
170 <sect4>
171 <title>OpenLDAP</title>
172
173 <para>
174 To use <application>OpenLDAP</application> with
175 <application>Postfix</application>, use the following arguments:
176 </para>
177
178<screen><literal>CCARGS='-DHAS_LDAP'
179AUXLIBS='-lldap -llber'</literal></screen>
180
181 </sect4>
182
183 <sect4>
184 <title>Sqlite</title>
185
186 <para>
187 To use <application>Sqlite</application> with
188 <application>Postfix</application>, use the following arguments:
189 </para>
190
191<screen><literal>CCARGS='-DHAS_SQLITE'
192AUXLIBS='-lsqlite3 -lpthread'</literal></screen>
193
194 </sect4>
195
196 <sect4>
197 <title>MySQL</title>
198
199 <para>
200 To use <application>MySQL</application> with
201 <application>Postfix</application>, use the following arguments:
202 </para>
203
204<screen><literal>CCARGS='-DHAS_MYSQL -I/usr/include/mysql'
205AUXLIBS='-lmysqlclient -lz -lm'</literal></screen>
206
207 </sect4>
208
209 <sect4>
210 <title>PostgreSQL</title>
211
212 <para>
213 To use <application>PostgreSQL</application> with
214 <application>Postfix</application>, use the following arguments:
215 </para>
216
217<screen><literal>CCARGS='-DHAS_PGSQL -I/usr/include/postgresql'
218AUXLIBS='-lpq -lz -lm'</literal></screen>
219
220 </sect4>
221
222 <sect4>
223 <title>CDB/TinyCDB</title>
224
225 <para>
226 To use <application>CDB</application> or
227 <application>TinyCDB</application> with
228 <application>Postfix</application>, use the following arguments:
229 </para>
230
231<screen><literal>CCARGS='-DHAS_CDB'
232AUXLIBS='<replaceable>&lt;/path/to/CDB&gt;</replaceable>/libcdb.a'</literal></screen>
233
234 </sect4>
235
236 <sect4>
237 <title>StartTLS Authentication</title>
238
239 <para>
240 To use <application>OpenSSL</application> with
241 <application>Postfix</application>, use the following arguments:
242 </para>
243
244<screen><literal>CCARGS='-DUSE_TLS -I/usr/include/openssl/'
245AUXLIBS='-lssl -lcrypto'</literal></screen>
246 </sect4>
247
248 </sect3>
249
250 <sect3>
251 <title>Installing Postfix</title>
252
253 <para>
254 If you have <application>Cyrus SASL</application> and
255 <application>OpenSSL</application> installed, install
256 <application>Postfix</application> by running the following commands:
257 </para>
258
259<screen><userinput>make CCARGS="-DUSE_TLS -I/usr/include/openssl/ \
260 -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \
261 AUXLIBS="-lssl -lcrypto -lsasl2" \
262 makefiles &amp;&amp;
263make</userinput></screen>
264
265 <!-- There is a testsuite, but it fails a lot. It seems to need
266 the host to be specifically setup for the tests.
267 Run with `make tests' and `make root_tests' -->
268 <para>
269 This package does not come with a useful test suite.
270 </para>
271
272 <para>
273 Now, as the <systemitem class="username">root</systemitem> user:
274 </para>
275
276<!-- dev note: sh postfix-install -non-interactive install_root=<DESTDIR> ... -->
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 <command>sh postfix-install -non-interactive</command>: This keeps the
299 install script from asking any questions, thereby accepting default
300 destination directories in all but the few cases. If the
301 <option>html_directory</option> and <option>readme_directory</option>
302 options are not set then the documentation will not be installed.
303 </para>
304
305 <para>
306 <option>CCARGS="-DNO_EAI ..."</option>: this will turn off SMTPUTF8
307 support, for example if the rest of your email address infrastructure
308 cannot handle UTF-8 email addresses and message header values.
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><phrase revision="sysv">Boot Script</phrase>
405 <phrase revision="systemd">Systemd Unit</phrase></title>
406
407 <para>
408 To automate the running of Postfix at startup, install the
409 <phrase revision="sysv"><filename>/etc/rc.d/init.d/postfix</filename>
410 init script</phrase>
411 <phrase revision="systemd"><filename>postfix.service</filename>
412 unit</phrase> included in the
413 <xref linkend="bootscripts" revision="sysv"/>
414 <xref linkend="systemd-units" revision="systemd"/> package.
415 </para>
416
417 <indexterm zone="postfix postfix-init">
418 <primary sortas="f-postfix">postfix</primary>
419 </indexterm>
420
421<screen role="root"><userinput>make install-postfix</userinput></screen>
422
423 </sect3>
424
425 </sect2>
426
427 <sect2 role="content">
428 <title>Contents</title>
429
430 <segmentedlist>
431 <segtitle>Installed Programs</segtitle>
432 <segtitle>Installed Libraries</segtitle>
433 <segtitle>Installed Directories</segtitle>
434
435 <seglistitem>
436 <seg>
437 mailq (symlink), newaliases (symlink), postalias, postcat, postconf,
438 postdrop, postfix, postkick, postlock, postlog, postmap, postmulti,
439 postqueue, postsuper, and sendmail
440 </seg>
441 <seg>
442 None
443 </seg>
444 <seg>
445 /{etc,usr/lib}/postfix,
446 /usr/share/doc/postfix-&postfix-version; and
447 /var/{lib,spool}/postfix
448 </seg>
449 </seglistitem>
450 </segmentedlist>
451
452 <variablelist>
453 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
454 <?dbfo list-presentation="list"?>
455 <?dbhtml list-presentation="table"?>
456
457 <varlistentry id="mailq">
458 <term><command>mailq</command></term>
459 <listitem>
460 <para>
461 A symlink to <filename>sendmail</filename>.
462 </para>
463 <indexterm zone="postfix mailq">
464 <primary sortas="b-mailq">mailq</primary>
465 </indexterm>
466 </listitem>
467 </varlistentry>
468
469 <varlistentry id="newaliases">
470 <term><command>newaliases</command></term>
471 <listitem>
472 <para>
473 A symlink to <filename>sendmail</filename>.
474 </para>
475 <indexterm zone="postfix newaliases">
476 <primary sortas="b-newaliases">newaliases</primary>
477 </indexterm>
478 </listitem>
479 </varlistentry>
480
481 <varlistentry id="postalias">
482 <term><command>postalias</command></term>
483 <listitem>
484 <para>
485 is a utility for <application>Postfix</application> alias database
486 maintenance
487 </para>
488 <indexterm zone="postfix postalias">
489 <primary sortas="b-postalias">postalias</primary>
490 </indexterm>
491 </listitem>
492 </varlistentry>
493
494 <varlistentry id="postcat">
495 <term><command>postcat</command></term>
496 <listitem>
497 <para>
498 Prints the contents of files from the
499 <application>Postfix</application> queue in human readable format.
500 </para>
501 <indexterm zone="postfix postcat">
502 <primary sortas="b-postcat">postcat</primary>
503 </indexterm>
504 </listitem>
505 </varlistentry>
506
507 <varlistentry id="postconf">
508 <term><command>postconf</command></term>
509 <listitem>
510 <para>
511 Displays or changes the value of
512 <application>Postfix</application> configuration parameters.
513 </para>
514 <indexterm zone="postfix postconf">
515 <primary sortas="b-postconf">postconf</primary>
516 </indexterm>
517 </listitem>
518 </varlistentry>
519
520 <varlistentry id="postdrop">
521 <term><command>postdrop</command></term>
522 <listitem>
523 <para>
524 Creates a file in the maildrop directory and copies its standard
525 input to the file.
526 </para>
527 <indexterm zone="postfix postdrop">
528 <primary sortas="b-postdrop">postdrop</primary>
529 </indexterm>
530 </listitem>
531 </varlistentry>
532
533 <varlistentry id="postfix-bin">
534 <term><command>postfix</command></term>
535 <listitem>
536 <para>
537 is the <application>Postfix</application> control program.
538 </para>
539 <indexterm zone="postfix postfix-bin">
540 <primary sortas="b-postfix">postfix</primary>
541 </indexterm>
542 </listitem>
543 </varlistentry>
544
545 <varlistentry id="postkick">
546 <term><command>postkick</command></term>
547 <listitem>
548 <para>
549 Sends requests to the specified service over a local transport
550 channel.
551 </para>
552 <indexterm zone="postfix postkick">
553 <primary sortas="b-postkick">postkick</primary>
554 </indexterm>
555 </listitem>
556 </varlistentry>
557
558 <varlistentry id="postlock">
559 <term><command>postlock</command></term>
560 <listitem>
561 <para>
562 Locks a mail folder for exclusive use, and executes commands passed
563 to it.
564 </para>
565 <indexterm zone="postfix postlock">
566 <primary sortas="b-postlock">postlock</primary>
567 </indexterm>
568 </listitem>
569 </varlistentry>
570
571 <varlistentry id="postlog">
572 <term><command>postlog</command></term>
573 <listitem>
574 <para>
575 A <application>Postfix</application>-compatible logging interface
576 for use in, for example, shell scripts.
577 </para>
578 <indexterm zone="postfix postlog">
579 <primary sortas="b-postlog">postlog</primary>
580 </indexterm>
581 </listitem>
582 </varlistentry>
583
584 <varlistentry id="postmap">
585 <term><command>postmap</command></term>
586 <listitem>
587 <para>
588 Creates or queries one or more Postfix lookup tables, or updates an
589 existing one.
590 </para>
591 <indexterm zone="postfix postmap">
592 <primary sortas="b-postmap">postmap</primary>
593 </indexterm>
594 </listitem>
595 </varlistentry>
596
597 <varlistentry id="postmulti">
598 <term><command>postmulti</command></term>
599 <listitem>
600 <para>
601 is the <application>Postfix</application> multi-instance manager.
602 It allows a system administrator to manage multiple
603 <application>Postfix</application> instances on a single host.
604 </para>
605 <indexterm zone="postfix postmulti">
606 <primary sortas="b-postmulti">postmulti</primary>
607 </indexterm>
608 </listitem>
609 </varlistentry>
610
611 <varlistentry id="postqueue">
612 <term><command>postqueue</command></term>
613 <listitem>
614 <para>
615 The <application>Postfix</application> user interface for
616 queue management.
617 </para>
618 <indexterm zone="postfix postqueue">
619 <primary sortas="b-postqueue">postqueue</primary>
620 </indexterm>
621 </listitem>
622 </varlistentry>
623
624 <varlistentry id="postsuper">
625 <term><command>postsuper</command></term>
626 <listitem>
627 <para>
628 The <application>Postfix</application> user interface for
629 superuser queue management.
630 </para>
631 <indexterm zone="postfix postsuper">
632 <primary sortas="b-postsuper">postsuper</primary>
633 </indexterm>
634 </listitem>
635 </varlistentry>
636
637 <varlistentry id="sendmail-postfix">
638 <term><command>sendmail</command></term>
639 <listitem>
640 <para>
641 is the <application>Postfix</application> to
642 <application>Sendmail</application> compatibility interface.
643 </para>
644 <indexterm zone="postfix sendmail-postfix">
645 <primary sortas="b-sendmail">sendmail</primary>
646 </indexterm>
647 </listitem>
648 </varlistentry>
649
650 </variablelist>
651
652 </sect2>
653
654</sect1>
Note: See TracBrowser for help on using the repository browser.