source: server/mail/postfix.xml@ a0fa5dd

systemd-13485
Last change on this file since a0fa5dd was a0fa5dd, checked in by DJ Lucas <dj@…>, 8 years ago

Update to trunk r17385.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@17386 af4574ff-66df-0310-9fd7-8a98e5e911e0

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