source: server/mail/postfix.xml@ 9b98149

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

Update to qt-everywhere-src-5.11.0.
Update to postfix-3.3.1.
Update to thunderbird-52.8.0.
Update to postgresql-10.4.
Update to seamonkey-2.49.3.

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