source: server/mail/postfix-systemd.xml@ 7ff0948

systemd-13485
Last change on this file since 7ff0948 was 7ff0948, checked in by Douglas R. Reno <renodr@…>, 9 years ago

Update to boost-1.59.0
Update to ruby-2.2.3
Update to OpenSSH-7.0p1
Update to libreoffice-5.0.0
Update to unbound-1.5.4
Update to BIND and BIND-Utilities-9.10.2p3
Update to sendmail-8.15.2
Update to exim-4.86
Update to apache-2.4.16
Update to vsftpd-3.0.3
Update to mariadb-10.0.21
Update to postfix-3.0.2
Update to OpenLDAP-2.4.42
Update to stunnel-5.22
Update to GCC-5.2.0 (including the ADA and Java compilers)
Update to php-5.6.12

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@16351 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;
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"/>,
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 read them in a text editor, make them legible with a sed:
137 </para>
138
139<screen><userinput>sed -i 's/.\x08//g' README_FILES/*</userinput></screen>
140
141 <para>
142 If you are running a Linux-4.x kernel, apply the following sed to
143 allow the <command>makedefs</command> script to recognize it:
144 </para>
145
146<screen><userinput>sed -i 's/Linux.3\*/Linux.[34]\*/' makedefs</userinput></screen>
147
148 <para>
149 The <application>Postfix</application> source tree does not contain a
150 <filename>configure</filename> script, rather the makefile in the
151 top-level directory contains a <option>makefiles</option> target that
152 regenerates all the other makefiles in the build tree. If you wish to
153 use additional software such as a database back-end for virtual users,
154 or TLS/SSL authentication, you will need to regenerate the makefiles
155 using one or more of the appropriate <envar>CCARGS</envar> and
156 <envar>AUXLIBS</envar> settings listed below.
157 </para>
158
159 <para>
160 For more details read the readme files.
161 </para>
162
163 <sect4>
164 <title>Cyrus-SASL</title>
165
166 <para>
167 To use <application>Cyrus-SASL</application> with
168 <application>Postfix</application>, use the following arguments:
169 </para>
170
171<screen><literal>CCARGS='-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl'
172AUXLIBS='-lsasl2'</literal></screen>
173
174 </sect4>
175
176 <sect4>
177 <title>OpenLDAP</title>
178
179 <para>
180 To use <application>OpenLDAP</application> with
181 <application>Postfix</application>, use the following arguments:
182 </para>
183
184<screen><literal>CCARGS='-DHAS_LDAP'
185AUXLIBS='-lldap -llber'</literal></screen>
186
187 </sect4>
188
189 <sect4>
190 <title>Sqlite</title>
191
192 <para>
193 To use <application>Sqlite</application> with
194 <application>Postfix</application>, use the following arguments:
195 </para>
196
197<screen><literal>CCARGS='-DHAS_SQLITE'
198AUXLIBS='-lsqlite3 -lpthread'</literal></screen>
199
200 </sect4>
201
202 <sect4>
203 <title>MySQL</title>
204
205 <para>
206 To use <application>MySQL</application> with
207 <application>Postfix</application>, use the following arguments:
208 </para>
209
210<screen><literal>CCARGS='-DHAS_MYSQL -I/usr/include/mysql'
211AUXLIBS='-lmysqlclient -lz -lm'</literal></screen>
212
213 </sect4>
214
215 <sect4>
216 <title>PostgreSQL</title>
217
218 <para>
219 To use <application>PostgreSQL</application> with
220 <application>Postfix</application>, use the following arguments:
221 </para>
222
223<screen><literal>CCARGS='-DHAS_PGSQL -I/usr/include/postgresql'
224AUXLIBS='-lpq -lz -lm'</literal></screen>
225
226 </sect4>
227
228 <sect4>
229 <title>CDB/TinyCDB</title>
230
231 <para>
232 To use <application>CDB</application> or
233 <application>TinyCDB</application> with
234 <application>Postfix</application>, use the following arguments:
235 </para>
236
237<screen><literal>CCARGS='-DHAS_CDB'
238AUXLIBS='<replaceable>&lt;/path/to/CDB&gt;</replaceable>/libcdb.a'</literal></screen>
239
240 </sect4>
241
242 <sect4>
243 <title>StartTLS Authentication</title>
244
245 <para>
246 To use <application>OpenSSL</application> with
247 <application>Postfix</application>, use the following arguments:
248 </para>
249
250<screen><literal>CCARGS='-DUSE_TLS -I/usr/include/openssl/'
251AUXLIBS='-lssl -lcrypto'</literal></screen>
252 </sect4>
253
254 </sect3>
255
256 <sect3>
257 <title>Installing Postfix</title>
258
259 <para>
260 If you have <application>Cyrus SASL</application> and
261 <application>OpenSSL</application> installed, install
262 <application>Postfix</application> by running the following commands:
263 </para>
264
265<screen><userinput>make CCARGS="-DUSE_TLS -I/usr/include/openssl/ \
266 -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \
267 AUXLIBS="-lssl -lcrypto -lsasl2" \
268 makefiles &amp;&amp;
269make</userinput></screen>
270
271 <!-- There is a testsuite, but it fails a lot. It seems to need
272 the host to be specifically setup for the tests.
273 Run with `make tests' and `make root_tests' -->
274 <para>
275 This package does not come with a useful test suite.
276 </para>
277
278 <para>
279 Now, as the <systemitem class="username">root</systemitem> user:
280 </para>
281
282<!-- dev note: sh postfix-install -non-interactive install_root=<DESTDIR> ... -->
283
284<screen role="root"><userinput>sh postfix-install -non-interactive \
285 daemon_directory=/usr/lib/postfix \
286 manpage_directory=/usr/share/man \
287 html_directory=/usr/share/doc/postfix-&postfix-version;/html \
288 readme_directory=/usr/share/doc/postfix-&postfix-version;/readme</userinput></screen>
289
290 </sect3>
291
292 </sect2>
293
294 <sect2 role="commands">
295 <title>Command Explanations</title>
296
297 <para>
298 <command>make makefiles</command>: This command rebuilds the makefiles
299 throughout the source tree to use the options contained in the
300 <envar>CCARGS</envar> and <envar>AUXLIBS</envar> variables.
301 </para>
302
303 <para>
304 <command>sh postfix-install -non-interactive</command>: This keeps the
305 install script from asking any questions, thereby accepting default
306 destination directories in all but the few cases. If the
307 <option>html_directory</option> and <option>readme_directory</option>
308 options are not set then the documentation will not be installed.
309 </para>
310
311 <para>
312 <option>CCARGS="-DNO_EAI ..."</option>: This will turn off SMTPUTF8
313 support, for example if the rest of your email address infrastructure
314 cannot handle UTF-8 email addresses and message header values.
315 </para>
316
317 </sect2>
318
319 <sect2 role="configuration">
320 <title>Configuring Postfix</title>
321
322 <sect3 id="postfix-config">
323 <title>Config Files</title>
324
325 <para>
326 <filename>/etc/aliases</filename>,
327 <filename>/etc/postfix/main.cf</filename>, and
328 <filename>/etc/postfix/master.cf</filename>
329 </para>
330
331 <indexterm zone="postfix postfix-config">
332 <primary sortas="e-etc-aliases">/etc/aliases</primary>
333 </indexterm>
334
335 <indexterm zone="postfix postfix-config">
336 <primary sortas="e-etc-postfix-star">/etc/postfix/*</primary>
337 </indexterm>
338
339 </sect3>
340
341 <sect3>
342 <title>Configuration Information</title>
343
344 <para>
345 Create (or append to an existing) <filename>/etc/aliases</filename>
346 with the following command. Change
347 <replaceable>&lt;LOGIN&gt;</replaceable> for your non-root login
348 identity so mail addressed to
349 <systemitem class="username">root</systemitem> can be forwarded to you.
350 As the <systemitem class="username">root</systemitem> user:
351 </para>
352
353<screen role="root"><userinput>cat &gt;&gt; /etc/aliases &lt;&lt; "EOF"
354<literal># Begin /etc/aliases
355
356MAILER-DAEMON: postmaster
357postmaster: root
358
359root: <replaceable>&lt;LOGIN&gt;</replaceable>
360# End /etc/aliases</literal>
361EOF</userinput></screen>
362
363 <para>
364 To protect an existing <filename>/etc/aliases</filename> file,
365 the above command appends these aliases to it if it exists. This file
366 should be checked and duplicate aliases removed, if present.
367 </para>
368
369 <note>
370 <para>
371 The <filename>/etc/postfix/main.cf</filename> and
372 <filename>/etc/postfix/master.cf</filename> files must be personalized
373 for your system. The <filename>main.cf</filename> file needs your
374 fully qualified hostname. You will find that
375 <filename>main.cf</filename> is self documenting, so load it into your
376 editor to make the changes you need for your situation.
377 </para>
378 </note>
379
380 <note>
381 <para>
382 <application>Postfix</application> can also be set up to
383 run in a chroot jail. See the file in the source
384 <filename>examples/chroot-setup/LINUX2</filename> for details.
385 </para>
386 </note>
387
388 <para>
389 If you have an existing configuration, you can run the
390 <command>postfix</command> utility to add any necessary definitions to
391 your existing files. As the
392 <systemitem class="username">root</systemitem> user:
393 </para>
394
395<screen role="root"><userinput>/usr/sbin/postfix upgrade-configuration</userinput></screen>
396
397 <para>
398 Before starting <application>Postfix</application>, you should check
399 that your configuration and file permissions will work properly. Run the
400 following commands as the <systemitem class="username">root</systemitem>
401 user to check and start your <application>Postfix</application> server:
402 </para>
403
404<screen role="root"><userinput>/usr/sbin/postfix check &amp;&amp;
405/usr/sbin/postfix start</userinput></screen>
406
407 </sect3>
408
409 <sect3 id="postfix-init">
410 <title>Systemd Units</title>
411
412 <para>
413 To start the <command>postfix</command> daemon at boot,
414 install the systemd unit from the <xref linkend="bootscripts"/>
415 package by running the following command as the
416 <systemitem class="username">root</systemitem> user:
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, newaliases, postalias, postcat, postconf, postdrop, postfix,
440 postkick, postlock, postlog, postmap, postmulti, postqueue, postsuper,
441 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.