source: server/mail/postfix.xml@ 419a60e

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 7.10 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 419a60e was 419a60e, checked in by Igor Živković <igor@…>, 11 years ago

added mariadb

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

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