source: server/mail/postfix.xml@ c22db16

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 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 c22db16 was c22db16, checked in by Ken Moffat <ken@…>, 9 years ago

tags

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