source: server/mail/postfix.xml@ 21f812b

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 21f812b was 6c703f15, checked in by Randy McMurchy <randy@…>, 19 years ago

Minor corrections to Postfix instructions

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3400 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.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7<!ENTITY postfix-download-http "http://www.mirrorspace.org/postfix/official/postfix-&postfix-version;.tar.gz">
8<!ENTITY postfix-download-ftp "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-&postfix-version;.tar.gz">
9<!ENTITY postfix-size "1.9 MB">
10<!ENTITY postfix-buildsize "81 MB">
11<!ENTITY postfix-time "0.29 SBU">
12]>
13
14<sect1 id="postfix" xreflabel="Postfix-&postfix-version;">
15<sect1info>
16<othername>$LastChangedBy$</othername>
17<date>$Date$</date>
18</sect1info>
19<?dbhtml filename="postfix.html"?>
20<title>Postfix-&postfix-version;</title>
21<indexterm zone="postfix">
22<primary sortas="a-Postfix">Postfix</primary></indexterm>
23
24<sect2>
25<title>Introduction to Postfix</title>
26
27<para>The <application>Postfix</application> package contains a Mail
28Transport Agent (<acronym>MTA</acronym>). This is useful for sending email
29to other users of your host machine. It can also be configured to be a
30central mail server for your domain, a mail relay agent or simply a mail
31delivery agent to your local Internet Service Provider
32(<acronym>ISP</acronym>).</para>
33
34<sect3><title>Package information</title>
35<itemizedlist spacing='compact'>
36<listitem><para>Download (HTTP): <ulink
37url="&postfix-download-http;"/></para></listitem>
38<listitem><para>Download (FTP): <ulink
39url="&postfix-download-ftp;"/></para></listitem>
40<listitem><para>Download size: &postfix-size;</para></listitem>
41<listitem><para>Estimated disk space required:
42&postfix-buildsize;</para></listitem>
43<listitem><para>Estimated build time:
44&postfix-time;</para></listitem></itemizedlist>
45</sect3>
46
47<sect3><title><application>Postfix</application> dependencies</title>
48<sect4><title>Required</title>
49<para><xref linkend="db"/></para></sect4>
50<sect4><title>Optional</title>
51<para>
52<xref linkend="pcre"/>,
53<xref linkend="mysql"/>,
54<xref linkend="postgresql"/>,
55<xref linkend="openldap"/>,
56<xref linkend="openssl"/> and
57<xref linkend="cyrus-sasl"/>
58</para></sect4>
59</sect3>
60
61</sect2>
62
63<sect2>
64<title>Installation of <application>Postfix</application></title>
65
66<sect3><title>Configuring the build</title>
67
68<para>The <application>Postfix</application> source tree does not contain a
69<filename>configure</filename> script, rather the makefile in the
70top-level directory contains a <parameter>makefiles</parameter> target that
71regenerates all the other makefiles in the build tree. If you wish to
72use additional software such as a database back-end for virtual users, or
73<acronym>TLS</acronym>/<acronym>SSL</acronym> authentication, you'll
74need to regenerate the makefiles using one or more of the appropriate
75<envar>CCARGS</envar> and <envar>AUXLIBS</envar> settings listed below.</para>
76
77<para>Here is an example that combines the
78<acronym>TLS</acronym>/<acronym>SSL</acronym> and
79<application>Cyrus-SASL</application> arguments:</para>
80
81<screen><userinput><command>make makefiles \
82CCARGS="-DHAS_SSL -DUSE_SASL_AUTH -I/usr/include/openssl -I/usr/include/sasl" \
83AUXLIBS="-L/usr/lib -R/usr/lib -lssl -lcrypto -lsasl2"</command></userinput></screen>
84
85<sect4><title>SSL/TLS authentication</title>
86<para>To use <acronym>SSL</acronym>/<acronym>TLS</acronym>
87authentication with <application>Postfix</application>, you'll first
88need to apply a patch availible from
89<ulink url="ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/pfixtls-0.8.18-2.1.3-0.9.7d.tar.gz"/>.
90Unzip the patch tarball, and apply with the following commands:</para>
91
92<screen><userinput><command>patch -p1 &lt; ../pfixtls-0.8.18-2.1.3-0.9.7d/pfixtls.diff</command></userinput></screen>
93
94<para>You will need to pass the following values to the <command>make
95makefiles</command> command:</para>
96
97<screen><userinput>CCARGS="-DHAS_SSL -I/usr/include/openssl" \
98AUXLIBS="-L/usr/lib -lssl -lcrypto"</userinput></screen>
99
100<para>To use <acronym>SSL</acronym> or <acronym>TLS</acronym> you will
101also need <xref linkend="cyrus-sasl"/>.</para>
102</sect4>
103
104<sect4><title>Cyrus-SASL</title>
105<para>To use <application>Cyrus-SASL</application> with
106<application>Postfix</application>, use the following arguments:</para>
107
108<screen><userinput>CCARGS="-DUSE_SASL_AUTH -I/usr/include/sasl" \
109AUXLIBS="-L/usr/lib -R/usr/lib -lsasl2"</userinput></screen>
110</sect4>
111
112<sect4><title>OpenLDAP</title>
113<para>To use <application>OpenLDAP</application> with
114<application>Postfix</application>, use the following arguments:</para>
115
116<screen><userinput>CCARGS="-I/usr/include -DHAS_LDAP" \
117AUXLIBS="-L/usr/lib -lldap -llber"</userinput></screen>
118</sect4>
119
120<sect4><title>MySQL</title>
121<para>To use <application>MySQL</application> with
122<application>Postfix</application>, use the following arguments:</para>
123
124<screen><userinput>CCARGS="-DHAS_MYSQL -I/usr/include/mysql" \
125AUXLIBS="-L/usr/lib -lmysqlclient -lz -lm"</userinput></screen>
126</sect4>
127
128<sect4><title>PostgreSQL</title>
129<para>To use <application>PostgreSQL</application> with
130<application>Postfix</application>, use the following arguments:</para>
131
132<screen><userinput>CCARGS="-DHAS_PGSQL -I/usr/include/postgresql" \
133AUXLIBS="-L/usr/lib -lpq -lz -lm"</userinput></screen>
134</sect4>
135
136</sect3>
137
138<sect3><title>Installing Postfix</title>
139
140<para>Before you compile the program, you need to create users and groups that
141will be expected to be in place when the install script executes. Add the
142users and groups with the following commands:</para>
143
144<screen><userinput><command>groupadd postfix &amp;&amp;
145groupadd postdrop &amp;&amp;
146groupadd -g 65534 nogroup &amp;&amp;
147useradd -c postfix -d /dev/null -g postfix -s /bin/false postfix &amp;&amp;
148useradd -c nobody -d /home -g nogroup -s /bin/bash -u 65534 nobody &amp;&amp;
149chown postfix:postfix /var/mail</command></userinput></screen>
150
151<para>Install <application>Postfix</application> by running the
152following commands:</para>
153
154<screen><userinput><command>make &amp;&amp;
155sh postfix-install daemon_directory=/usr/sbin \
156 manpage_directory=/usr/share/man \
157 sample_directory=/usr/share/doc/postfix \
158 -non-interactive</command></userinput></screen>
159
160<para>The final installation step is to install the program's documentation with
161the following commands:</para>
162
163<screen><userinput><command>install -d /usr/share/doc/postfix &amp;&amp;
164cp -rf html/* /usr/share/doc/postfix</command></userinput></screen>
165</sect3></sect2>
166
167<sect2>
168<title>Command explanations</title>
169
170<para><command>sh postfix-install ... -non-interactive</command> : This keeps
171the install script from asking any questions, thereby accepting default
172destination directories in all but the three cases explicitly mentioned.</para>
173
174<para><command>make makefiles</command> : This command rebuilds the
175makefiles throughout the source tree to use the options contained in the
176<envar>CCARGS</envar> and <envar>AUXLIBS</envar> variables.</para>
177
178</sect2>
179
180<sect2>
181<title>Configuring <application>Postfix</application></title>
182
183<sect3 id="postfix-config"><title>Config files</title>
184<para><filename>/etc/aliases</filename>,
185<filename>/etc/postfix/main.cf</filename> and
186<filename>/etc/postfix/master.cf</filename></para>
187<indexterm zone="postfix postfix-config">
188<primary sortas="e-etc-aliases">/etc/aliases</primary></indexterm>
189<indexterm zone="postfix postfix-config">
190<primary sortas="e-etc-postfix-star">/etc/postfix/*</primary></indexterm>
191</sect3>
192
193<sect3><title>Configuration Information</title>
194
195<screen><userinput><command>cat &gt;&gt; /etc/aliases &lt;&lt; "EOF"</command>
196# Begin /etc/aliases
197
198MAILER-DAEMON: postmaster
199postmaster: root
200
201root: LOGIN
202# End /etc/aliases
203<command>EOF</command></userinput></screen>
204
205<note><para>To protect an existing <filename>/etc/aliases</filename> file, the
206above command appends these aliases to it if it exists. This file should be
207checked and duplicate aliases removed, if present.</para></note>
208
209<para>The <filename>/etc/aliases</filename> file that was just created or
210appended, the <filename>main.cf</filename> and the
211<filename>master.cf</filename> must be personalized for your system. The
212<filename>aliases</filename> file needs your non-root login identity so mail
213addressed to root can be forwarded to you at the user level. The
214<filename>main.cf</filename> file needs your fully qualified hostname. All of
215these edits can be done with sed commands entered into the console with
216appropriate substitutions of your non-root login name for
217<replaceable>[user]</replaceable> and your fully qualified hostname for
218<replaceable>[localhost.localdomain]</replaceable>. You will find the
219<filename>main.cf</filename> file is self documenting, so load it into your
220editor to make the changes you need for your situation.</para>
221
222<screen><userinput><command>sed -i "s/LOGIN/<replaceable>[user]</replaceable>/" /etc/aliases &amp;&amp;
223sed -i "s/#myhostname = host.domain.tld/myhostname = \
224 <replaceable>[localhost.localdomain]</replaceable>/" /etc/postfix/main.cf &amp;&amp;
225/usr/bin/newaliases &amp;&amp;
226/usr/sbin/postfix start</command></userinput></screen></sect3>
227
228<sect3 id="postfix-init"><title>Postfix init.d script</title>
229
230<para>To automate the running of Postfix at startup, install the
231<filename>/etc/rc.d/init.d/postfix</filename> init script included in the
232<xref linkend="intro-important-bootscripts"/> package.</para>
233<indexterm zone="postfix postfix-init"> <primary
234sortas="f-postfix">postfix</primary></indexterm>
235
236<screen><userinput><command>make install-postfix</command></userinput></screen>
237
238</sect3>
239
240</sect2>
241
242<sect2>
243<title>Contents</title>
244
245<segmentedlist>
246<segtitle>Installed Programs</segtitle>
247<segtitle>Installed Directories</segtitle>
248
249<seglistitem>
250<seg>bounce, cleanup, error, flush, lmtp, local, mailq, master,
251newaliases, nqmgr, oqmgr, pickup, pipe, postalias, postcat, postconf,
252postdrop, postfix, postkick, postlock, postlog, postmap, postqueue,
253postsuper, proxymap, qmgr, qmqpd, sendmail, showq, smtp, smtpd, spawn,
254trivial-rewrite, verify, and virtual</seg>
255<seg>/etc/postfix and /usr/share/doc/postfix</seg>
256</seglistitem>
257</segmentedlist>
258
259<variablelist>
260<bridgehead renderas="sect3">Short Descriptions</bridgehead>
261<?dbfo list-presentation="list"?>
262
263<varlistentry id="bounce">
264<term><command>bounce</command></term>
265<listitem><para>A daemon that maintains per-message log files with
266non-delivery status information.</para>
267<indexterm zone="postfix bounce">
268<primary sortas="b-bounce">bounce</primary></indexterm>
269</listitem>
270</varlistentry>
271
272<varlistentry id="cleanup">
273<term><command>cleanup</command></term>
274<listitem><para>A daemon that processes inbound mail, inserts it into the
275incoming mail queue, and informs the queue manager of its arrival.</para>
276<indexterm zone="postfix cleanup">
277<primary sortas="b-cleanup">cleanup</primary></indexterm>
278</listitem>
279</varlistentry>
280
281<varlistentry id="error">
282<term><command>error</command></term>
283<listitem><para>A deamon that processes non-delivery requests from the
284queue manager.</para>
285<indexterm zone="postfix error">
286<primary sortas="b-error">error</primary></indexterm>
287</listitem>
288</varlistentry>
289
290<varlistentry id="flush">
291<term><command>flush</command></term>
292<listitem><para>A daemon that maintains a record of deferred mail by
293destination.</para>
294<indexterm zone="postfix flush">
295<primary sortas="b-flush">flush</primary></indexterm>
296</listitem>
297</varlistentry>
298
299<varlistentry id="lmtp">
300<term><command>lmtp</command></term>
301<listitem><para>A daemon that processes message delivery requests from the
302queue manager.</para>
303<indexterm zone="postfix lmtp">
304<primary sortas="b-lmtp">lmtp</primary></indexterm>
305</listitem>
306</varlistentry>
307
308<varlistentry id="local">
309<term><command>local</command></term>
310<listitem><para>A daemon that processes delivery requests from the queue
311manager to deliver mail to local recipients.</para>
312<indexterm zone="postfix local">
313<primary sortas="b-local">local</primary></indexterm>
314</listitem>
315</varlistentry>
316
317<varlistentry id="mailq">
318<term><command>mailq</command></term>
319<listitem><para>A symlink to <filename>sendmail</filename>.</para>
320<indexterm zone="postfix mailq">
321<primary sortas="b-mailq">mailq</primary></indexterm>
322</listitem>
323</varlistentry>
324
325<varlistentry id="master">
326<term><command>master</command></term>
327<listitem><para>The resident process that runs
328<application>Postfix</application> daemons on demand.</para>
329<indexterm zone="postfix master">
330<primary sortas="b-master">master</primary></indexterm>
331</listitem>
332</varlistentry>
333
334<varlistentry id="newaliases">
335<term><command>newaliases</command></term>
336<listitem><para>A symlink to <filename>sendmail</filename>.</para>
337<indexterm zone="postfix newaliases">
338<primary sortas="b-newaliases">newaliases</primary></indexterm>
339</listitem>
340</varlistentry>
341
342<varlistentry id="nqmgr">
343<term><command>nqmgr</command></term>
344<listitem><para>A daemon that awaits the arrival of incoming mail and
345arranges for its delivery.</para>
346<indexterm zone="postfix nqmgr">
347<primary sortas="b-nqmgr">nqmgr</primary></indexterm>
348</listitem>
349</varlistentry>
350
351<varlistentry id="oqmgr">
352<term><command>oqmgr</command></term>
353<listitem><para>The old style queue manager. This will be removed
354soon.</para>
355<indexterm zone="postfix oqmgr">
356<primary sortas="b-oqmgr">oqmgr</primary></indexterm>
357</listitem>
358</varlistentry>
359
360<varlistentry id="pickup">
361<term><command>pickup</command></term>
362<listitem><para>A daemon that waits for hints that new mail has been
363dropped into the maildrop directory, and feeds it into the
364<application>cleanup</application> daemon.</para>
365<indexterm zone="postfix pickup">
366<primary sortas="b-pickup">pickup</primary></indexterm>
367</listitem>
368</varlistentry>
369
370<varlistentry id="pipe">
371<term><command>pipe</command></term>
372<listitem><para>A daemon that processes requests from the queue
373manager to deliver messages to external commands.</para>
374<indexterm zone="postfix pipe">
375<primary sortas="b-pipe">pipe</primary></indexterm>
376</listitem>
377</varlistentry>
378
379<varlistentry id="postalias">
380<term><command>postalias</command></term>
381<listitem><para>Creates or queries one or more
382<application>Postfix</application> alias databases, or updates an
383existing one.</para>
384<indexterm zone="postfix postalias">
385<primary sortas="b-postalias">postalias</primary></indexterm>
386</listitem>
387</varlistentry>
388
389<varlistentry id="postcat">
390<term><command>postcat</command></term>
391<listitem><para>Prints the contents of the
392<application>named</application> files in human readable format.</para>
393<indexterm zone="postfix postcat">
394<primary sortas="b-postcat">postcat</primary></indexterm>
395</listitem>
396</varlistentry>
397
398<varlistentry id="postconf">
399<term><command>postconf</command></term>
400<listitem><para>Displays or changes the value of
401<application>Postfix</application> configuration parameters.</para>
402<indexterm zone="postfix postconf">
403<primary sortas="b-postconf">postconf</primary></indexterm>
404</listitem>
405</varlistentry>
406
407<varlistentry id="postdrop">
408<term><command>postdrop</command></term>
409<listitem><para>Creates a file in the maildrop directory and copies
410it's standard input to the file.</para>
411<indexterm zone="postfix postdrop">
412<primary sortas="b-postdrop">postdrop</primary></indexterm>
413</listitem>
414</varlistentry>
415
416<varlistentry id="postfix-bin">
417<term><command>postfix</command></term>
418<listitem><para>Controls the operation of the
419<application>Postfix</application> mail system.</para>
420<indexterm zone="postfix postfix-bin">
421<primary sortas="b-postfix">postfix</primary></indexterm>
422</listitem>
423</varlistentry>
424
425<varlistentry id="postkick">
426<term><command>postkick</command></term>
427<listitem><para>Sends requests to the specified service over a
428local transport channel.</para>
429<indexterm zone="postfix postkick">
430<primary sortas="b-postkick">postkick</primary></indexterm>
431</listitem>
432</varlistentry>
433
434<varlistentry id="postlock">
435<term><command>postlock</command></term>
436<listitem><para>Locks a mail folder for exclusive use, and executes
437commands passed to it.</para>
438<indexterm zone="postfix postlock">
439<primary sortas="b-postlock">postlock</primary></indexterm>
440</listitem>
441</varlistentry>
442
443<varlistentry id="postlog">
444<term><command>postlog</command></term>
445<listitem><para>A <application>Postfix</application>-compatible logging
446interface for use in, for example, shell scripts.</para>
447<indexterm zone="postfix postlog">
448<primary sortas="b-postlog">postlog</primary></indexterm>
449</listitem>
450</varlistentry>
451
452<varlistentry id="postmap">
453<term><command>postmap</command></term>
454<listitem><para>Creates or queries one or more Postfix lookup
455tables, or updates an existing one.</para>
456<indexterm zone="postfix postmap">
457<primary sortas="b-postmap">postmap</primary></indexterm>
458</listitem>
459</varlistentry>
460
461<varlistentry id="postqueue">
462<term><command>postqueue</command></term>
463<listitem><para>The <application>Postfix</application> user interface for
464queue management.</para>
465<indexterm zone="postfix postqueue">
466<primary sortas="b-postqueue">postqueue</primary></indexterm>
467</listitem>
468</varlistentry>
469
470<varlistentry id="postsuper">
471<term><command>postsuper</command></term>
472<listitem><para>The <application>Postfix</application> user interface for
473superuser queue management.</para>
474<indexterm zone="postfix postsuper">
475<primary sortas="b-postsuper">postsuper</primary></indexterm>
476</listitem>
477</varlistentry>
478
479<varlistentry id="proxymap">
480<term><command>proxymap</command></term>
481<listitem><para>Provides read-only table lookup services to other
482<application>Postfix</application> processes.</para>
483<indexterm zone="postfix proxymap">
484<primary sortas="b-proxymap">proxymap</primary></indexterm>
485</listitem>
486</varlistentry>
487
488<varlistentry id="qmgr">
489<term><command>qmgr</command></term>
490<listitem><para>A daemon that awaits the arrival of incoming mail and
491arranges for its delivery.</para>
492<indexterm zone="postfix qmgr">
493<primary sortas="b-qmgr">qmgr</primary></indexterm>
494</listitem>
495</varlistentry>
496
497<varlistentry id="qmqpd">
498<term><command>qmqpd</command></term>
499<listitem><para>A daemon that receives one message per connection, and
500pipes it through the <application>cleanup</application> daemon, and
501places it into the incoming queue.</para>
502<indexterm zone="postfix qmqpd">
503<primary sortas="b-qmqpd">qmqpd</primary></indexterm>
504</listitem>
505</varlistentry>
506
507<varlistentry id="sendmail-postfix">
508<term><command>sendmail</command></term>
509<listitem><para>The <application>Postfix</application> to
510<application>Sendmail</application> compatibility interface.</para>
511<indexterm zone="postfix sendmail-postfix">
512<primary sortas="b-sendmail">sendmail</primary></indexterm>
513</listitem>
514</varlistentry>
515
516<varlistentry id="showq">
517<term><command>showq</command></term>
518<listitem><para>A daemon that reports the Postfix mail queue status.</para>
519<indexterm zone="postfix showq">
520<primary sortas="b-showq">showq</primary></indexterm>
521</listitem>
522</varlistentry>
523
524<varlistentry id="smtp">
525<term><command>smtp</command></term>
526<listitem><para>Looks up a list of mail exchanger addresses for the
527destination host, sorts the list by preference, and connects to
528each listed address until it finds a server that responds.</para>
529<indexterm zone="postfix smtp">
530<primary sortas="b-smtp">smtp</primary></indexterm>
531</listitem>
532</varlistentry>
533
534<varlistentry id="smtpd">
535<term><command>smtpd</command></term>
536<listitem><para>Accepts network connection requests and performs zero
537or more SMTP transactions per connection.</para>
538<indexterm zone="postfix smtpd">
539<primary sortas="b-smtpd">smtpd</primary></indexterm>
540</listitem>
541</varlistentry>
542
543<varlistentry id="spawn">
544<term><command>spawn</command></term>
545<listitem><para>Listens on a port as specified in the
546<application>Postfix</application> <filename>master.cf</filename> file
547and spawns an external command whenever a connection is established.</para>
548<indexterm zone="postfix spawn">
549<primary sortas="b-spawn">spawn</primary></indexterm>
550</listitem>
551</varlistentry>
552
553<varlistentry id="trivial-rewrite">
554<term><command>trivial-rewrite</command></term>
555<listitem><para>A daemon that rewrites addresses to standard form.</para>
556<indexterm zone="postfix trivial-rewrite">
557<primary sortas="b-trivial-rewrite">trivial-rewrite</primary></indexterm>
558</listitem>
559</varlistentry>
560
561<varlistentry id="verify">
562<term><command>verify</command></term>
563<listitem><para>Maintains a record of what recipient addresses are known
564to be deliverable or undeliverable.</para>
565<indexterm zone="postfix verify">
566<primary sortas="b-verify">verify</primary></indexterm>
567</listitem>
568</varlistentry>
569
570<varlistentry id="virtual">
571<term><command>virtual</command></term>
572<listitem><para>Delivers mail to virtual user's mail directories.</para>
573<indexterm zone="postfix virtual">
574<primary sortas="b-virtual">virtual</primary></indexterm>
575</listitem>
576</varlistentry>
577</variablelist>
578
579</sect2>
580
581</sect1>
582
Note: See TracBrowser for help on using the repository browser.