source: server/mail/postfix.xml@ 3bfd1d6

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 3bfd1d6 was 3bfd1d6, checked in by DJ Lucas <dj@…>, 19 years ago

Added 'make makefiles' to Postfix, other minor changes.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3380 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 13.0 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
15<sect1 id="postfix" xreflabel="Postfix-&postfix-version;">
16<sect1info>
17<othername>$LastChangedBy$</othername>
18<date>$Date$</date>
19</sect1info>
20<?dbhtml filename="postfix.html"?>
21<title>Postfix-&postfix-version;</title>
22
23<sect2>
24<title>Introduction to Postfix</title>
25
26<para>The <application>Postfix</application> package contains a Mail
27Transport Agent (<acronym>MTA</acronym>). This is useful for sending email
28to other users of your host machine. It can also be configured to be a
29central mail server for your domain, a mail relay agent or simply a mail
30delivery agent to your local Internet Service Provider
31(<acronym>ISP</acronym>).</para>
32
33<sect3><title>Package information</title>
34<itemizedlist spacing='compact'>
35<listitem><para>Download (HTTP): <ulink
36url="&postfix-download-http;"/></para></listitem>
37<listitem><para>Download (FTP): <ulink
38url="&postfix-download-ftp;"/></para></listitem>
39<listitem><para>Download size: &postfix-size;</para></listitem>
40<listitem><para>Estimated disk space required:
41&postfix-buildsize;</para></listitem>
42<listitem><para>Estimated build time:
43&postfix-time;</para></listitem></itemizedlist>
44</sect3>
45
46<sect3><title><application>Postfix</application> dependencies</title>
47<sect4><title>Required</title>
48<para><xref linkend="db"/></para></sect4>
49<sect4><title>Optional</title>
50<para>
51<xref linkend="pcre"/>,
52<xref linkend="mysql"/>,
53<xref linkend="postgresql"/>,
54<xref linkend="openldap"/>,
55<xref linkend="openssl"/> and
56<xref linkend="cyrus-sasl"/>
57</para></sect4>
58</sect3>
59
60</sect2>
61
62<sect2>
63<title>Installation of <application>Postfix</application></title>
64
65<sect3><title>Configuring the build</title>
66
67<para>The <application>Postfix</application> source tree does not contain a
68<filename>configure</filename> script, rather the makefile in the
69top-level directory contains a <parameter>makefiles</parameter> target that
70regenerates all the other makefiles in the build tree. If you wish to
71use additional software such as a database back-end for virtual users, or
72<acronym>TLS</acronym>/<acronym>SSL</acronym> authentication, you'll
73need to regenerate the makefiles using one or more of the appropriate
74<envar>CCARGS</envar> and <envar>AUXLIBS</envar> settings listed below.</para>
75
76<para>Here is an example that combines the
77<acronym>TLS</acronym>/<acronym>SSL</acronym> and
78<application>Cyrus-SASL</application> arguments:</para>
79
80<screen><userinput><command>make makefiles \
81CCARGS="-DHAS_SSL -DUSE_SASL_AUTH -I/usr/include/openssl -I/usr/include/sasl" \
82AUXLIBS="-L/usr/lib -R/usr/lib -lssl -lcrypto -lsasl2"</command></userinput></screen>
83
84<sect4><title>SSL/TLS authentication</title>
85<para>To use <acronym>SSL</acronym>/<acronym>TLS</acronym>
86authentication with <application>Postfix</application>, you'll first
87need to apply a patch availible from
88<ulink url="ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/pfixtls-0.8.18-2.1.3-0.9.7d.tar.gz"/>.
89Unzip the patch tarball, and apply with the following commands:</para>
90
91<screen><userinput><command>patch -p1 &lt; ../pfixtls-0.8.18-2.1.3-0.9.7d/pfixtls.diff</command></userinput></screen>
92
93<para>You will need to pass the following values to the <command>make
94makefiles</command> command:</para>
95
96<screen><userinput>CCARGS="-DHAS_SSL -I/usr/include/openssl" \
97AUXLIBS="-L/usr/lib -lssl -lcrypto"</userinput></screen>
98
99<para>To use <acronym>SSL</acronym> or <acronym>TLS</acronym> you will
100also need <xref linkend="cyrus-sasl"/>.</para>
101</sect4>
102
103<sect4><title>Cyrus-SASL</title>
104<para>To use <application>Cyrus-SASL</application> with
105<application>Postfix</application>, use the following arguments:</para>
106
107<screen><userinput>CCARGS="-DUSE_SASL_AUTH -I/usr/include/sasl" \
108AUXLIBS="-L/usr/lib -R/usr/lib -lsasl2"</userinput></screen>
109</sect4>
110
111<sect4><title>OpenLDAP</title>
112<para>To use <application>OpenLDAP</application> with
113<application>Postfix</application>, use the following arguments:</para>
114
115<screen><userinput>CCARGS="-I/usr/include -DHAS_LDAP" \
116AUXLIBS="-L/usr/lib -lldap -llber"</userinput></screen>
117</sect4>
118
119<sect4><title>MySQL</title>
120<para>To use <application>MySQL</application> with
121<application>Postfix</application>, use the following arguments:</para>
122
123<screen><userinput>CCARGS="-DHAS_MYSQL -I/usr/include/mysql" \
124AUXLIBS="-L/usr/lib -lmysqlclient -lz -lm"</userinput></screen>
125</sect4>
126
127<sect4><title>PostgreSQL</title>
128<para>To use <application>PostgreSQL</application> with
129<application>Postfix</application>, use the following arguments:</para>
130
131<screen><userinput>CCARGS="-DHAS_PGSQL -I/usr/include/postgresql" \
132AUXLIBS="-L/usr/lib -lpq -lz -lm"</userinput></screen>
133</sect4>
134
135</sect3>
136
137<sect3><title>Installing Postfix</title>
138
139<para>Before you compile the program, you need to create users and groups that
140will be expected to be in place when the install script executes. Add the
141users and groups with the following commands:</para>
142
143<screen><userinput><command>groupadd postfix &amp;&amp;
144groupadd postdrop &amp;&amp;
145groupadd -g 65534 nogroup &amp;&amp;
146useradd -c postfix -d /dev/null -g postfix -s /bin/false postfix &amp;&amp;
147useradd -c nobody -d /home -g nogroup -s /bin/bash -u 65534 nobody &amp;&amp;
148chown postfix:postfix /var/mail</command></userinput></screen>
149
150<para>Install <application>Postfix</application> by running the
151following commands:</para>
152
153<screen><userinput><command>make &amp;&amp;
154sh postfix-install daemon_directory=/usr/sbin \
155 manpage_directory=/usr/share/man \
156 sample_directory=/usr/share/doc/postfix \
157 -non-interactive</command></userinput></screen>
158
159<para>The final installation step is to install the program's documentation with
160the following commands:</para>
161
162<screen><userinput><command>install -d /usr/share/doc/postfix &amp;&amp;
163cp -rf html/* /usr/share/doc/postfix</command></userinput></screen>
164</sect3></sect2>
165
166<sect2>
167<title>Command explanations</title>
168
169<para><command>sh postfix-install ... -non-interactive</command> : This keeps
170the install script from asking any questions, thereby accepting default
171destination directories in all but the three cases explicitly mentioned.</para>
172
173<para><command>make makefiles</command> : This command rebuilds the
174makefiles throughout the source tree to use the options contained in the
175<envar>CCARGS</envar> and <envar>AUXLIBS</envar> variables.</para>
176
177</sect2>
178
179<sect2>
180<title>Configuring <application>Postfix</application></title>
181
182<sect3><title>Config files</title>
183<para><filename>/etc/aliases</filename>,
184<filename>/etc/postfix/main.cf</filename> and
185<filename>/etc/postfix/master.cf</filename></para>
186</sect3>
187
188<sect3><title>Configuration Information</title>
189
190<screen><userinput><command>cat &gt;&gt; /etc/aliases &lt;&lt; "EOF"</command>
191# Begin /etc/aliases
192
193MAILER-DAEMON: postmaster
194postmaster: root
195
196root: LOGIN
197# End /etc/aliases
198<command>EOF</command></userinput></screen>
199
200<note><para>To protect an existing <filename>/etc/aliases</filename> file, the
201above command appends these aliases to it if it exists. This file should be
202checked and duplicate aliases removed, if present.</para></note>
203
204<para>The <filename>/etc/aliases</filename> file that was just created or
205appended, the <filename>main.cf</filename> and the
206<filename>master.cf</filename> must be personalized for your system. The
207<filename>aliases</filename> file needs your non-root login identity so mail
208addressed to root can be forwarded to you at the user level. The
209<filename>main.cf</filename> file needs your fully qualified hostname. All of
210these edits can be done with sed commands entered into the console with
211appropriate substitutions of your non-root login name for
212<replaceable>[user]</replaceable> and your fully qualified hostname for
213<replaceable>[localhost.localdomain]</replaceable>. You will find the
214<filename>main.cf</filename> file is self documenting, so load it into your
215editor to make the changes you need for your situation.</para>
216
217<screen><userinput><command>sed -i "s/LOGIN/<replaceable>[user]</replaceable>/" /etc/aliases &amp;&amp;
218sed -i "s/#myhostname = host.domain.tld/myhostname = \
219 <replaceable>[localhost.localdomain]</replaceable>/" /etc/postfix/main.cf &amp;&amp;
220/usr/bin/newaliases &amp;&amp;
221/usr/sbin/postfix start</command></userinput></screen></sect3>
222
223<sect3><title>Postfix init.d script</title>
224
225<para>To automate the running of Postfix at startup, install the
226<filename>/etc/rc.d/init.d/postfix</filename> init script included in the
227<xref linkend="intro-important-bootscripts"/> package.</para>
228
229<screen><userinput><command>make install-postfix</command></userinput></screen>
230
231</sect3>
232
233</sect2>
234
235<sect2>
236<title>Contents</title>
237
238<para>The <application>Postfix</application> package contains
239<command>bounce</command>, <command>cleanup</command>,
240<command>error</command>, <command>flush</command>,
241<command>lmtp</command>, <command>local</command>,
242<command>mailq</command>, <command>master</command>,
243<command>newaliases</command>, <command>nqmgr</command>,
244<command>pickup</command>, <command>pipe</command>,
245<command>postalias</command>, <command>postcat</command>,
246<command>postconf</command>, <command>postdrop</command>,
247<command>postfix</command>, <command>postkick</command>,
248<command>postlock</command>, <command>postlog</command>,
249<command>postmap</command>, <command>postqueue</command>,
250<command>postsuper</command>, <command>qmgr</command>,
251<command>qmqpd</command>, <command>sendmail</command>,
252<command>showq</command>, <command>smtp</command>,
253<command>smtpd</command>, <command>spawn</command>,
254<command>trivial-rewrite</command>, and <command>virtual</command>.</para>
255
256</sect2>
257
258<sect2><title>Description</title>
259
260<sect3><title>postfix</title>
261<para><command>postfix</command> is the program that starts and stops the mail
262delivery system.</para></sect3>
263
264<sect3><title>master</title>
265<para><command>master</command> is the resident process that runs
266<filename>bounce</filename>, <filename>cleanup</filename>,
267<filename>error</filename>, <filename>flush</filename>,
268<filename>lmtp</filename>, <filename>local</filename>,
269<filename>nqmgr</filename>, <filename>pickup</filename>,
270<filename>pipe</filename>, <filename>qmgr</filename>,
271<filename>qmqpd</filename>, <filename>showq</filename>,
272<filename>smtp</filename>, <filename>smtpd</filename>,
273<filename>spawn</filename>, <filename>trivial-rewrite</filename> and
274<filename>virtual</filename> on demand. These programs are not designed to
275work as user commands.</para></sect3>
276
277<sect3><title>postqueue</title>
278<para><command>postqueue</command> implements the
279<application>Postfix</application> user interface for
280queue management. It implements all the operations that are traditionally
281available via the <command>sendmail</command> command.</para></sect3>
282
283<sect3><title>sendmail</title>
284<para><command>sendmail</command> implements the
285<application>Postfix</application> to
286<application>Sendmail</application> compatibility interface.
287<filename class="symlink">mailq</filename> and <filename
288class="symlink">newaliases</filename> are symlinks to
289<command>sendmail</command>.</para></sect3>
290
291<sect3><title>showq</title>
292<para><command>showq</command> will emulate the <filename
293class="symlink">mailq</filename> command when the
294<application>Postfix</application> mail system is
295not running.</para></sect3>
296
297<sect3><title>postsuper</title>
298<para><command>postsuper</command> does maintenance jobs on the
299<application>Postfix</application> queue.</para></sect3>
300
301<sect3><title>postalias</title>
302<para><command>postalias</command> creates, queries or updates
303<application>Postfix</application> alias
304databases.</para></sect3>
305
306<sect3><title>postcat</title>
307<para><command>postcat</command> prints the contents of a
308<application>Postfix</application> queue file in human-readable
309form.</para></sect3>
310
311<sect3><title>postconf</title>
312<para><command>postconf</command> prints or changes the value of configuration
313parameters.</para></sect3>
314
315<sect3><title>postdrop</title>
316<para><command>postdrop</command> creates a file in the maildrop directory and
317copies its standard input to the file.</para></sect3>
318
319<sect3><title>postkick</title>
320<para><command>postkick</command> makes the mail system private
321<acronym>IPC</acronym> accessible for use in shell
322scripts.</para></sect3>
323
324<sect3><title>postlock</title>
325<para><command>postlock</command> locks a file for exclusive access and
326executes a command on that file.</para></sect3>
327
328<sect3><title>postlog</title>
329<para><command>postlog</command> implements a logging interface for use in
330shell scripts.</para></sect3>
331
332<sect3><title>postmap</title>
333<para><command>postmap</command> creates, queries or updates
334<application>Postfix</application> lookup tables.</para></sect3>
335
336</sect2>
337
338</sect1>
339
Note: See TracBrowser for help on using the repository browser.