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
|
---|
27 | Transport Agent (<acronym>MTA</acronym>). This is useful for sending email
|
---|
28 | to other users of your host machine. It can also be configured to be a
|
---|
29 | central mail server for your domain, a mail relay agent or simply a mail
|
---|
30 | delivery 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
|
---|
36 | url="&postfix-download-http;"/></para></listitem>
|
---|
37 | <listitem><para>Download (FTP): <ulink
|
---|
38 | url="&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"/> and
|
---|
55 | <xref linkend="cyrus-sasl"/>
|
---|
56 | </para></sect4>
|
---|
57 | </sect3>
|
---|
58 |
|
---|
59 | </sect2>
|
---|
60 |
|
---|
61 | <sect2>
|
---|
62 | <title>Installation of <application>Postfix</application></title>
|
---|
63 |
|
---|
64 | <para>Before you compile the program, you need to create users and groups that
|
---|
65 | will be expected to be in place when the install script executes. Add the
|
---|
66 | users and groups with the following commands:</para>
|
---|
67 |
|
---|
68 | <screen><userinput><command>groupadd postfix &&
|
---|
69 | groupadd postdrop &&
|
---|
70 | groupadd -g 65534 nogroup &&
|
---|
71 | useradd -c postfix -d /dev/null -g postfix -s /bin/false postfix &&
|
---|
72 | useradd -c nobody -d /home -g nogroup -s /bin/bash -u 65534 nobody &&
|
---|
73 | chown postfix:postfix /var/mail</command></userinput></screen>
|
---|
74 |
|
---|
75 | <para>Install <application>Postfix</application> by running the following
|
---|
76 | commands:</para>
|
---|
77 |
|
---|
78 | <screen><userinput><command>make &&
|
---|
79 | sh postfix-install daemon_directory=/usr/sbin \
|
---|
80 | manpage_directory=/usr/share/man \
|
---|
81 | sample_directory=/usr/share/doc/postfix \
|
---|
82 | -non-interactive</command></userinput></screen>
|
---|
83 |
|
---|
84 | <para>The final installation step is to install the program's documentation with
|
---|
85 | the following commands:</para>
|
---|
86 |
|
---|
87 | <screen><userinput><command>install -d /usr/share/doc/postfix &&
|
---|
88 | cp -rf html/* /usr/share/doc/postfix</command></userinput></screen>
|
---|
89 |
|
---|
90 | </sect2>
|
---|
91 |
|
---|
92 | <sect2>
|
---|
93 | <title>Command explanations</title>
|
---|
94 |
|
---|
95 | <para><command>sh postfix-install ... -non-interactive</command> : This keeps
|
---|
96 | the install script from asking any questions, thereby accepting default
|
---|
97 | destination directories in all but the three cases explicitly mentioned.</para>
|
---|
98 |
|
---|
99 | <para><option>CCARGS="$CCARGS -DHAS_MYSQL -I/usr/include/mysql"
|
---|
100 | AUXLIBS="$AUXLIBS -L/usr/lib/mysql -lmysqlclient -lz -lm"</option> :
|
---|
101 | These <command>make</command> variables add
|
---|
102 | <application>My<acronym>SQL</acronym></application> support to
|
---|
103 | <application>Postfix</application>.</para>
|
---|
104 |
|
---|
105 | <para><option>CCARGS="$CCARGS -DHAS_PGSQL -I/usr/include/postgresql/server"
|
---|
106 | AUXLIBS="$AUXLIBS -lpq"</option>: These <command>make</command> variables add
|
---|
107 | <application>Postgre<acronym>SQL</acronym></application> support to
|
---|
108 | <application>Postfix</application>.</para>
|
---|
109 |
|
---|
110 | <para><option>CCARGS="$CCARGS -DHAS_LDAP" AUXLIBS="$AUXLIBS -lldap -llber"</option> : These
|
---|
111 | <command>make</command> variables add
|
---|
112 | <application>Open<acronym>LDAP</acronym></application> support to
|
---|
113 | <application>Postfix</application>.</para>
|
---|
114 |
|
---|
115 | <para><option>CCARGS="$CCARGS -DUSE_SASL_AUTH" AUXLIBS="$AUXLIBS -lsasl"</option> : These
|
---|
116 | <command>make</command> variables add <application>Cyrus
|
---|
117 | <acronym>SASL</acronym></application> support to
|
---|
118 | <application>Postfix</application>.</para>
|
---|
119 |
|
---|
120 | </sect2>
|
---|
121 |
|
---|
122 | <sect2>
|
---|
123 | <title>Configuring <application>Postfix</application></title>
|
---|
124 |
|
---|
125 | <sect3><title>Config files</title>
|
---|
126 | <para><filename>/etc/aliases</filename>,
|
---|
127 | <filename>/etc/postfix/main.cf</filename> and
|
---|
128 | <filename>/etc/postfix/master.cf</filename></para>
|
---|
129 | </sect3>
|
---|
130 |
|
---|
131 | <sect3><title>Configuration Information</title>
|
---|
132 |
|
---|
133 | <screen><userinput><command>cat >> /etc/aliases << "EOF"</command>
|
---|
134 | # Begin /etc/aliases
|
---|
135 |
|
---|
136 | MAILER-DAEMON: postmaster
|
---|
137 | postmaster: root
|
---|
138 |
|
---|
139 | root: LOGIN
|
---|
140 | # End /etc/aliases
|
---|
141 | <command>EOF</command></userinput></screen>
|
---|
142 |
|
---|
143 | <note><para>To protect an existing <filename>/etc/aliases</filename> file, the
|
---|
144 | above command appends these aliases to it if it exists. This file should be
|
---|
145 | checked and duplicate aliases removed, if present.</para></note>
|
---|
146 |
|
---|
147 | <para>The <filename>/etc/aliases</filename> file that was just created or
|
---|
148 | appended, the <filename>main.cf</filename> and the
|
---|
149 | <filename>master.cf</filename> must be personalized for your system. The
|
---|
150 | <filename>aliases</filename> file needs your non-root login identity so mail
|
---|
151 | addressed to root can be forwarded to you at the user level. The
|
---|
152 | <filename>main.cf</filename> file needs your fully qualified hostname. All of
|
---|
153 | these edits can be done with sed commands entered into the console with
|
---|
154 | appropriate substitutions of your non-root login name for
|
---|
155 | <replaceable>[user]</replaceable> and your fully qualified hostname for
|
---|
156 | <replaceable>[localhost.localdomain]</replaceable>. You will find the
|
---|
157 | <filename>main.cf</filename> file is self documenting, so load it into your
|
---|
158 | editor to make the changes you need for your situation.</para>
|
---|
159 |
|
---|
160 | <screen><userinput><command>sed -i "s/LOGIN/<replaceable>[user]</replaceable>/" /etc/aliases &&
|
---|
161 | sed -i "s/#myhostname = host.domain.tld/myhostname = \
|
---|
162 | <replaceable>[localhost.localdomain]</replaceable>/" /etc/postfix/main.cf &&
|
---|
163 | /usr/bin/newaliases &&
|
---|
164 | /usr/sbin/postfix start</command></userinput></screen></sect3>
|
---|
165 |
|
---|
166 | <sect3><title>Postfix init.d script</title>
|
---|
167 |
|
---|
168 | <para>To automate the running of Postfix at startup, install the
|
---|
169 | <filename>/etc/rc.d/init.d/postfix</filename> init script included in the
|
---|
170 | <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
171 |
|
---|
172 | <screen><userinput><command>make install-postfix</command></userinput></screen>
|
---|
173 |
|
---|
174 | </sect3>
|
---|
175 |
|
---|
176 | </sect2>
|
---|
177 |
|
---|
178 | <sect2>
|
---|
179 | <title>Contents</title>
|
---|
180 |
|
---|
181 | <para>The <application>Postfix</application> package contains
|
---|
182 | <command>bounce</command>, <command>cleanup</command>,
|
---|
183 | <command>error</command>, <command>flush</command>,
|
---|
184 | <command>lmtp</command>, <command>local</command>,
|
---|
185 | <command>mailq</command>, <command>master</command>,
|
---|
186 | <command>newaliases</command>, <command>nqmgr</command>,
|
---|
187 | <command>pickup</command>, <command>pipe</command>,
|
---|
188 | <command>postalias</command>, <command>postcat</command>,
|
---|
189 | <command>postconf</command>, <command>postdrop</command>,
|
---|
190 | <command>postfix</command>, <command>postkick</command>,
|
---|
191 | <command>postlock</command>, <command>postlog</command>,
|
---|
192 | <command>postmap</command>, <command>postqueue</command>,
|
---|
193 | <command>postsuper</command>, <command>qmgr</command>,
|
---|
194 | <command>qmqpd</command>, <command>sendmail</command>,
|
---|
195 | <command>showq</command>, <command>smtp</command>,
|
---|
196 | <command>smtpd</command>, <command>spawn</command>,
|
---|
197 | <command>trivial-rewrite</command>, and <command>virtual</command>.</para>
|
---|
198 |
|
---|
199 | </sect2>
|
---|
200 |
|
---|
201 | <sect2><title>Description</title>
|
---|
202 |
|
---|
203 | <sect3><title>postfix</title>
|
---|
204 | <para><command>postfix</command> is the program that starts and stops the mail
|
---|
205 | delivery system.</para></sect3>
|
---|
206 |
|
---|
207 | <sect3><title>master</title>
|
---|
208 | <para><command>master</command> is the resident process that runs
|
---|
209 | <filename>bounce</filename>, <filename>cleanup</filename>,
|
---|
210 | <filename>error</filename>, <filename>flush</filename>,
|
---|
211 | <filename>lmtp</filename>, <filename>local</filename>,
|
---|
212 | <filename>nqmgr</filename>, <filename>pickup</filename>,
|
---|
213 | <filename>pipe</filename>, <filename>qmgr</filename>,
|
---|
214 | <filename>qmqpd</filename>, <filename>showq</filename>,
|
---|
215 | <filename>smtp</filename>, <filename>smtpd</filename>,
|
---|
216 | <filename>spawn</filename>, <filename>trivial-rewrite</filename> and
|
---|
217 | <filename>virtual</filename> on demand. These programs are not designed to
|
---|
218 | work as user commands.</para></sect3>
|
---|
219 |
|
---|
220 | <sect3><title>postqueue</title>
|
---|
221 | <para><command>postqueue</command> implements the
|
---|
222 | <application>Postfix</application> user interface for
|
---|
223 | queue management. It implements all the operations that are traditionally
|
---|
224 | available via the <command>sendmail</command> command.</para></sect3>
|
---|
225 |
|
---|
226 | <sect3><title>sendmail</title>
|
---|
227 | <para><command>sendmail</command> implements the
|
---|
228 | <application>Postfix</application> to
|
---|
229 | <application>Sendmail</application> compatibility interface.
|
---|
230 | <filename class="symlink">mailq</filename> and <filename
|
---|
231 | class="symlink">newaliases</filename> are symlinks to
|
---|
232 | <command>sendmail</command>.</para></sect3>
|
---|
233 |
|
---|
234 | <sect3><title>showq</title>
|
---|
235 | <para><command>showq</command> will emulate the <filename
|
---|
236 | class="symlink">mailq</filename> command when the
|
---|
237 | <application>Postfix</application> mail system is
|
---|
238 | not running.</para></sect3>
|
---|
239 |
|
---|
240 | <sect3><title>postsuper</title>
|
---|
241 | <para><command>postsuper</command> does maintenance jobs on the
|
---|
242 | <application>Postfix</application> queue.</para></sect3>
|
---|
243 |
|
---|
244 | <sect3><title>postalias</title>
|
---|
245 | <para><command>postalias</command> creates, queries or updates
|
---|
246 | <application>Postfix</application> alias
|
---|
247 | databases.</para></sect3>
|
---|
248 |
|
---|
249 | <sect3><title>postcat</title>
|
---|
250 | <para><command>postcat</command> prints the contents of a
|
---|
251 | <application>Postfix</application> queue file in human-readable
|
---|
252 | form.</para></sect3>
|
---|
253 |
|
---|
254 | <sect3><title>postconf</title>
|
---|
255 | <para><command>postconf</command> prints or changes the value of configuration
|
---|
256 | parameters.</para></sect3>
|
---|
257 |
|
---|
258 | <sect3><title>postdrop</title>
|
---|
259 | <para><command>postdrop</command> creates a file in the maildrop directory and
|
---|
260 | copies its standard input to the file.</para></sect3>
|
---|
261 |
|
---|
262 | <sect3><title>postkick</title>
|
---|
263 | <para><command>postkick</command> makes the mail system private
|
---|
264 | <acronym>IPC</acronym> accessible for use in shell
|
---|
265 | scripts.</para></sect3>
|
---|
266 |
|
---|
267 | <sect3><title>postlock</title>
|
---|
268 | <para><command>postlock</command> locks a file for exclusive access and
|
---|
269 | executes a command on that file.</para></sect3>
|
---|
270 |
|
---|
271 | <sect3><title>postlog</title>
|
---|
272 | <para><command>postlog</command> implements a logging interface for use in
|
---|
273 | shell scripts.</para></sect3>
|
---|
274 |
|
---|
275 | <sect3><title>postmap</title>
|
---|
276 | <para><command>postmap</command> creates, queries or updates
|
---|
277 | <application>Postfix</application> lookup tables.</para></sect3>
|
---|
278 |
|
---|
279 | </sect2>
|
---|
280 |
|
---|
281 | </sect1>
|
---|
282 |
|
---|