source: server/mail/postfix.xml@ 0a76c13

10.0 10.1 11.0 11.1 11.2 11.3 7.10 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind ken/inkscape-core-mods lazarus nosym perl-modules plabs/python-mods qt5new trunk upgradedb xry111/intltool xry111/soup3 xry111/test-20220226
Last change on this file since 0a76c13 was 0a76c13, checked in by Fernando de Oliveira <fernando@…>, 8 years ago
  • Update to sudo-1.8.14p2.
  • Update to ffmpeg-2.7.2.
  • Update to appstream-glib-0.4.1.
  • Update to postfix-3.0.2.
  • Update to gdk-pixbuf-2.31.5.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@16270 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 "d1dc2c23011c222129db3d91aa4f312a">
11 <!ENTITY postfix-size "4.1 MB">
12 <!ENTITY postfix-buildsize "198 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,usr/lib}/postfix,
448 /usr/share/doc/postfix-&postfix-version; and
449 /var/{lib,spool}/postfix
450 </seg>
451 </seglistitem>
452 </segmentedlist>
453
454 <variablelist>
455 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
456 <?dbfo list-presentation="list"?>
457 <?dbhtml list-presentation="table"?>
458
459 <varlistentry id="mailq">
460 <term><command>mailq</command></term>
461 <listitem>
462 <para>
463 A symlink to <filename>sendmail</filename>.
464 </para>
465 <indexterm zone="postfix mailq">
466 <primary sortas="b-mailq">mailq</primary>
467 </indexterm>
468 </listitem>
469 </varlistentry>
470
471 <varlistentry id="newaliases">
472 <term><command>newaliases</command></term>
473 <listitem>
474 <para>
475 A symlink to <filename>sendmail</filename>.
476 </para>
477 <indexterm zone="postfix newaliases">
478 <primary sortas="b-newaliases">newaliases</primary>
479 </indexterm>
480 </listitem>
481 </varlistentry>
482
483 <varlistentry id="postalias">
484 <term><command>postalias</command></term>
485 <listitem>
486 <para>
487 is a utility for <application>Postfix</application> alias database
488 maintenance
489 </para>
490 <indexterm zone="postfix postalias">
491 <primary sortas="b-postalias">postalias</primary>
492 </indexterm>
493 </listitem>
494 </varlistentry>
495
496 <varlistentry id="postcat">
497 <term><command>postcat</command></term>
498 <listitem>
499 <para>
500 Prints the contents of files from the
501 <application>Postfix</application> queue in human readable format.
502 </para>
503 <indexterm zone="postfix postcat">
504 <primary sortas="b-postcat">postcat</primary>
505 </indexterm>
506 </listitem>
507 </varlistentry>
508
509 <varlistentry id="postconf">
510 <term><command>postconf</command></term>
511 <listitem>
512 <para>
513 Displays or changes the value of
514 <application>Postfix</application> configuration parameters.
515 </para>
516 <indexterm zone="postfix postconf">
517 <primary sortas="b-postconf">postconf</primary>
518 </indexterm>
519 </listitem>
520 </varlistentry>
521
522 <varlistentry id="postdrop">
523 <term><command>postdrop</command></term>
524 <listitem>
525 <para>
526 Creates a file in the maildrop directory and copies its standard
527 input to the file.
528 </para>
529 <indexterm zone="postfix postdrop">
530 <primary sortas="b-postdrop">postdrop</primary>
531 </indexterm>
532 </listitem>
533 </varlistentry>
534
535 <varlistentry id="postfix-bin">
536 <term><command>postfix</command></term>
537 <listitem>
538 <para>
539 is the <application>Postfix</application> control program.
540 </para>
541 <indexterm zone="postfix postfix-bin">
542 <primary sortas="b-postfix">postfix</primary>
543 </indexterm>
544 </listitem>
545 </varlistentry>
546
547 <varlistentry id="postkick">
548 <term><command>postkick</command></term>
549 <listitem>
550 <para>
551 Sends requests to the specified service over a local transport
552 channel.
553 </para>
554 <indexterm zone="postfix postkick">
555 <primary sortas="b-postkick">postkick</primary>
556 </indexterm>
557 </listitem>
558 </varlistentry>
559
560 <varlistentry id="postlock">
561 <term><command>postlock</command></term>
562 <listitem>
563 <para>
564 Locks a mail folder for exclusive use, and executes commands passed
565 to it.
566 </para>
567 <indexterm zone="postfix postlock">
568 <primary sortas="b-postlock">postlock</primary>
569 </indexterm>
570 </listitem>
571 </varlistentry>
572
573 <varlistentry id="postlog">
574 <term><command>postlog</command></term>
575 <listitem>
576 <para>
577 A <application>Postfix</application>-compatible logging interface
578 for use in, for example, shell scripts.
579 </para>
580 <indexterm zone="postfix postlog">
581 <primary sortas="b-postlog">postlog</primary>
582 </indexterm>
583 </listitem>
584 </varlistentry>
585
586 <varlistentry id="postmap">
587 <term><command>postmap</command></term>
588 <listitem>
589 <para>
590 Creates or queries one or more Postfix lookup tables, or updates an
591 existing one.
592 </para>
593 <indexterm zone="postfix postmap">
594 <primary sortas="b-postmap">postmap</primary>
595 </indexterm>
596 </listitem>
597 </varlistentry>
598
599 <varlistentry id="postmulti">
600 <term><command>postmulti</command></term>
601 <listitem>
602 <para>
603 is the <application>Postfix</application> multi-instance manager.
604 It allows a system administrator to manage multiple
605 <application>Postfix</application> instances on a single host.
606 </para>
607 <indexterm zone="postfix postmulti">
608 <primary sortas="b-postmulti">postmulti</primary>
609 </indexterm>
610 </listitem>
611 </varlistentry>
612
613 <varlistentry id="postqueue">
614 <term><command>postqueue</command></term>
615 <listitem>
616 <para>
617 The <application>Postfix</application> user interface for
618 queue management.
619 </para>
620 <indexterm zone="postfix postqueue">
621 <primary sortas="b-postqueue">postqueue</primary>
622 </indexterm>
623 </listitem>
624 </varlistentry>
625
626 <varlistentry id="postsuper">
627 <term><command>postsuper</command></term>
628 <listitem>
629 <para>
630 The <application>Postfix</application> user interface for
631 superuser queue management.
632 </para>
633 <indexterm zone="postfix postsuper">
634 <primary sortas="b-postsuper">postsuper</primary>
635 </indexterm>
636 </listitem>
637 </varlistentry>
638
639 <varlistentry id="sendmail-postfix">
640 <term><command>sendmail</command></term>
641 <listitem>
642 <para>
643 is the <application>Postfix</application> to
644 <application>Sendmail</application> compatibility interface.
645 </para>
646 <indexterm zone="postfix sendmail-postfix">
647 <primary sortas="b-sendmail">sendmail</primary>
648 </indexterm>
649 </listitem>
650 </varlistentry>
651
652 </variablelist>
653
654 </sect2>
655
656</sect1>
Note: See TracBrowser for help on using the repository browser.