source: server/mail/postfix.xml@ 88fdf09

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt 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 88fdf09 was 88fdf09, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Tags

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