source: server/mail/postfix-systemd.xml@ c016e37

systemd-13485
Last change on this file since c016e37 was c016e37, checked in by Christopher Gregory <cjg@…>, 9 years ago

Manually merge postfix update from trunk.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@14812 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 "8e762068938ffc2160645b989bb77c4d">
11 <!ENTITY postfix-size "3.9 MB">
12 <!ENTITY postfix-buildsize "140 MB">
13 <!ENTITY postfix-time "0.3 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 &lfs76_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 <ulink url="http://www.mysql.com/">MySQL</ulink>,
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="-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<!-- dev note: sh postfix-install -non-interactive install_root=<DESTDIR> ... -->
287
288<screen role="root"><userinput>sh postfix-install -non-interactive \
289 daemon_directory=/usr/lib/postfix \
290 manpage_directory=/usr/share/man \
291 html_directory=/usr/share/doc/postfix-&postfix-version;/html \
292 readme_directory=/usr/share/doc/postfix-&postfix-version;/readme</userinput></screen>
293
294 </sect3>
295
296 </sect2>
297
298 <sect2 role="commands">
299 <title>Command Explanations</title>
300
301 <para>
302 <command>make makefiles</command>: This command rebuilds the makefiles
303 throughout the source tree to use the options contained in the
304 <envar>CCARGS</envar> and <envar>AUXLIBS</envar> variables.
305 </para>
306
307 <para>
308 <command>sh postfix-install -non-interactive</command>: This keeps the
309 install script from asking any questions, thereby accepting default
310 destination directories in all but the few cases. If the
311 <option>html_directory</option> and <option>readme_directory</option>
312 options are not set then the documentation will not be installed.
313 </para>
314
315 </sect2>
316
317 <sect2 role="configuration">
318 <title>Configuring Postfix</title>
319
320 <sect3 id="postfix-config">
321 <title>Config Files</title>
322
323 <para>
324 <filename>/etc/aliases</filename>,
325 <filename>/etc/postfix/main.cf</filename>, and
326 <filename>/etc/postfix/master.cf</filename>
327 </para>
328
329 <indexterm zone="postfix postfix-config">
330 <primary sortas="e-etc-aliases">/etc/aliases</primary>
331 </indexterm>
332
333 <indexterm zone="postfix postfix-config">
334 <primary sortas="e-etc-postfix-star">/etc/postfix/*</primary>
335 </indexterm>
336
337 </sect3>
338
339 <sect3>
340 <title>Configuration Information</title>
341
342 <para>
343 Create (or append to an existing) <filename>/etc/aliases</filename>
344 with the following command. Change
345 <replaceable>&lt;LOGIN&gt;</replaceable> for your non-root login
346 identity so mail addressed to
347 <systemitem class="username">root</systemitem> can be forwarded to you.
348 As the <systemitem class="username">root</systemitem> user:
349 </para>
350
351<screen role="root"><userinput>cat &gt;&gt; /etc/aliases &lt;&lt; "EOF"
352<literal># Begin /etc/aliases
353
354MAILER-DAEMON: postmaster
355postmaster: root
356
357root: <replaceable>&lt;LOGIN&gt;</replaceable>
358# End /etc/aliases</literal>
359EOF</userinput></screen>
360
361 <para>
362 To protect an existing <filename>/etc/aliases</filename> file,
363 the above command appends these aliases to it if it exists. This file
364 should be checked and duplicate aliases removed, if present.
365 </para>
366
367 <note>
368 <para>
369 The <filename>/etc/postfix/main.cf</filename> and
370 <filename>/etc/postfix/master.cf</filename> files must be personalized
371 for your system. The <filename>main.cf</filename> file needs your
372 fully qualified hostname. You will find that
373 <filename>main.cf</filename> is self documenting, so load it into your
374 editor to make the changes you need for your situation.
375 </para>
376 </note>
377
378 <note>
379 <para>
380 <application>Postfix</application> can also be set up to
381 run in a chroot jail. See the file in the source
382 <filename>examples/chroot-setup/LINUX2</filename> for details.
383 </para>
384 </note>
385
386 <para>
387 If you have an existing configuration, you can run the
388 <command>postfix</command> utility to add any necessary definitions to
389 your existing files. As the
390 <systemitem class="username">root</systemitem> user:
391 </para>
392
393<screen role="root"><userinput>/usr/sbin/postfix upgrade-configuration</userinput></screen>
394
395 <para>
396 Before starting <application>Postfix</application>, you should check
397 that your configuration and file permissions will work properly. Run the
398 following commands as the <systemitem class="username">root</systemitem>
399 user to check and start your <application>Postfix</application> server:
400 </para>
401
402<screen role="root"><userinput>/usr/sbin/postfix check &amp;&amp;
403/usr/sbin/postfix start</userinput></screen>
404
405 </sect3>
406
407 <sect3 id="postfix-init">
408 <title>Systemd Units</title>
409
410 <para>
411 To start the <command>postfix</command> daemon at boot,
412 install the systemd unit from the <xref linkend="bootscripts"/>
413 package by running the following command as the
414 <systemitem class="username">root</systemitem> user:
415 </para>
416
417 <indexterm zone="postfix postfix-init">
418 <primary sortas="f-postfix">postfix</primary>
419 </indexterm>
420
421<screen role="root"><userinput>make install-postfix</userinput></screen>
422
423 </sect3>
424
425 </sect2>
426
427 <sect2 role="content">
428 <title>Contents</title>
429
430 <segmentedlist>
431 <segtitle>Installed Programs</segtitle>
432 <segtitle>Installed Libraries</segtitle>
433 <segtitle>Installed Directories</segtitle>
434
435 <seglistitem>
436 <seg>
437 mailq, newaliases, postalias, postcat, postconf, postdrop, postfix,
438 postkick, postlock, postlog, postmap, postmulti, postqueue, postsuper,
439 and sendmail
440 </seg>
441 <seg>
442 None
443 </seg>
444 <seg>
445 /etc/postfix,
446 /usr/lib/postfix,
447 /usr/share/doc/postfix-&postfix-version;,
448 /var/lib/postfix, and
449 /var/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.