2004-06-13 13:38:30 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
2004-07-12 01:01:54 +08:00
|
|
|
<!ENTITY postfix-download-http "http://www.mirrorspace.org/postfix/official/postfix-&postfix-version;.tar.gz">
|
2004-06-13 13:38:30 +08:00
|
|
|
<!ENTITY postfix-download-ftp "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-&postfix-version;.tar.gz">
|
|
|
|
<!ENTITY postfix-size "1.9 MB">
|
2004-07-12 01:01:54 +08:00
|
|
|
<!ENTITY postfix-buildsize "81 MB">
|
2004-06-13 13:38:30 +08:00
|
|
|
<!ENTITY postfix-time "0.29 SBU">
|
|
|
|
|
|
|
|
]>
|
|
|
|
|
2003-09-27 03:39:35 +08:00
|
|
|
<sect1 id="postfix" xreflabel="Postfix-&postfix-version;">
|
2004-05-07 10:32:10 +08:00
|
|
|
<?dbhtml filename="postfix.html"?>
|
2003-09-27 03:39:35 +08:00
|
|
|
<title>Postfix-&postfix-version;</title>
|
2002-07-08 04:28:42 +08:00
|
|
|
|
2004-06-13 13:38:30 +08:00
|
|
|
<sect2>
|
|
|
|
<title>Introduction to Postfix</title>
|
|
|
|
|
|
|
|
<para>The <application>Postfix</application> package contains a Mail
|
|
|
|
Transport Agent (<acronym>MTA</acronym>). This is useful for sending email
|
|
|
|
to other users of your host machine. It can also be configured to be a
|
|
|
|
central mail server for your domain, a mail relay agent or simply a mail
|
|
|
|
delivery agent to your local Internet Service Provider
|
|
|
|
(<acronym>ISP</acronym>).</para>
|
|
|
|
|
|
|
|
<sect3><title>Package information</title>
|
|
|
|
<itemizedlist spacing='compact'>
|
|
|
|
<listitem><para>Download (HTTP): <ulink
|
|
|
|
url="&postfix-download-http;"/></para></listitem>
|
|
|
|
<listitem><para>Download (FTP): <ulink
|
|
|
|
url="&postfix-download-ftp;"/></para></listitem>
|
|
|
|
<listitem><para>Download size: &postfix-size;</para></listitem>
|
|
|
|
<listitem><para>Estimated Disk space required:
|
|
|
|
&postfix-buildsize;</para></listitem>
|
|
|
|
<listitem><para>Estimated build time:
|
|
|
|
&postfix-time;</para></listitem></itemizedlist>
|
|
|
|
</sect3>
|
|
|
|
|
|
|
|
<sect3><title><application>Postfix</application> dependencies</title>
|
|
|
|
<sect4><title>Required</title>
|
|
|
|
<para><xref linkend="db"/></para></sect4>
|
|
|
|
<sect4><title>Optional</title>
|
|
|
|
<para><ulink url="http://asg.web.cmu.edu/sasl/">Cyrus SASL</ulink></para></sect4>
|
|
|
|
</sect3>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2>
|
|
|
|
<title>Installation of <application>Postfix</application></title>
|
|
|
|
|
|
|
|
<para>Before you compile the program, you need to create users and groups that
|
|
|
|
will be expected to be in place when the install script executes. Add the
|
|
|
|
users and groups with the following commands:</para>
|
|
|
|
|
|
|
|
<screen><userinput><command>groupadd postfix &&
|
|
|
|
groupadd postdrop &&
|
|
|
|
groupadd -g 65534 nogroup &&
|
|
|
|
useradd -c postfix -d /dev/null -g postfix -s /bin/false postfix &&
|
|
|
|
useradd -c nobody -d /home -g nogroup -s /bin/bash -u 65534 nobody &&
|
|
|
|
chown postfix:postfix /var/mail</command></userinput></screen>
|
|
|
|
|
|
|
|
<para>Install <application>postfix</application> by running the following commands:</para>
|
|
|
|
|
|
|
|
<screen><userinput><command>make &&
|
|
|
|
sh postfix-install daemon_directory=/usr/sbin \
|
|
|
|
manpage_directory=/usr/share/man \
|
|
|
|
sample_directory=/usr/share/doc/postfix \
|
|
|
|
-non-interactive</command></userinput></screen>
|
|
|
|
|
|
|
|
<para>The final installation step is to install the program's documentation with this command:</para>
|
|
|
|
|
|
|
|
<screen><userinput><command>install -d /usr/share/doc/postfix &&
|
|
|
|
cp -rf html/* /usr/share/doc/postfix</command></userinput></screen>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2>
|
|
|
|
<title>Command explanations</title>
|
|
|
|
|
|
|
|
<para><command>sh postfix-install ... -non-interactive</command> :
|
|
|
|
We don't want the install script to ask any questions so we call it with
|
|
|
|
a non-interactive switch and accept default destination directories in
|
|
|
|
all but three cases.</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2>
|
|
|
|
<title>Configuring <application>Postfix</application></title>
|
|
|
|
|
|
|
|
<sect3><title>Config files</title>
|
|
|
|
<para><filename>/etc/aliases</filename>,
|
|
|
|
<filename>/etc/postfix/main.cf</filename> and
|
|
|
|
<filename>/etc/postfix/master.cf</filename></para>
|
|
|
|
</sect3>
|
|
|
|
|
|
|
|
<sect3><title>Configuration Information</title>
|
|
|
|
|
|
|
|
<screen><userinput><command>cat >> /etc/aliases << "EOF"</command>
|
|
|
|
# Begin /etc/aliases
|
|
|
|
|
|
|
|
MAILER-DAEMON: postmaster
|
|
|
|
postmaster: root
|
|
|
|
|
|
|
|
root: LOGIN
|
|
|
|
# End /etc/aliases
|
|
|
|
<command>EOF</command></userinput></screen>
|
|
|
|
|
|
|
|
<note><para>To protect an existing <filename>/etc/aliases</filename>
|
|
|
|
file, we will append these aliases to it if it exists. This file
|
|
|
|
should be checked and duplicate aliases removed, if
|
|
|
|
present.</para></note>
|
|
|
|
|
|
|
|
<para>The <filename>/etc/aliases</filename> file that was just created
|
|
|
|
or appended, the <filename>main.cf</filename> and the
|
|
|
|
<filename>master.cf</filename>
|
|
|
|
must be personalized for your system. The <filename>aliases</filename> file
|
|
|
|
needs your non-root login identity so mail addressed to root can be forwarded
|
|
|
|
to you at the user level. The <filename>main.cf</filename> file needs your
|
|
|
|
fully qualified hostname. All of these edits can be done with sed commands
|
|
|
|
entered into the console with appropriate substitutions of your non-root
|
|
|
|
login name for <replaceable>[user]</replaceable> and your fully qualified
|
|
|
|
hostname for <replaceable>[localhost.localdomain]</replaceable>. You will
|
|
|
|
find the <filename>main.cf</filename> file
|
|
|
|
is self documenting, so load it into your editor to make the changes you need
|
|
|
|
for your situation.</para>
|
|
|
|
|
|
|
|
<screen><userinput><command>cp /etc/aliases /etc/aliases.bak &&
|
|
|
|
cp /etc/postfix/main.cf /etc/postfix/main.cf.bak &&
|
|
|
|
sed "s/LOGIN/<replaceable>[user]</replaceable>/" /etc/aliases.bak > /etc/aliases &&
|
|
|
|
sed "s/#myhostname = host.domain.tld/myhostname = \
|
|
|
|
<replaceable>[localhost.localdomain]</replaceable>/" \
|
|
|
|
/etc/postfix/main.cf.bak > /etc/postfix/main.cf &&
|
|
|
|
/usr/bin/newaliases &&
|
|
|
|
/usr/sbin/postfix start</command></userinput></screen></sect3>
|
|
|
|
|
|
|
|
<sect3><title>Postfix init.d script</title>
|
|
|
|
|
|
|
|
<para>To automate the running of Postfix at startup, install the <filename>/etc/rc.d/init.d/postfix</filename>
|
|
|
|
init script included in the <xref linkend="intro-important-bootscripts"/> package.</para>
|
|
|
|
|
|
|
|
<screen><userinput><command>make install-postfix</command></userinput></screen>
|
|
|
|
|
|
|
|
</sect3>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2>
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<para>The <application>Postfix</application> package contains <filename>bounce
|
|
|
|
</filename>, <filename>cleanup</filename>, <filename>error</filename>,
|
|
|
|
<filename>flush</filename>, <filename>lmtp</filename>,
|
|
|
|
<filename>local</filename>, <filename class="symlink">mailq</filename>,
|
|
|
|
<filename>master</filename>, <filename class="symlink">newaliases</filename>,
|
|
|
|
<filename>nqmgr</filename>, <filename>pickup</filename>,
|
|
|
|
<filename>pipe</filename>, <command>postalias</command>,
|
|
|
|
<command>postcat</command>, <command>postconf</command>,
|
|
|
|
<command>postdrop</command>, <command>postfix</command>,
|
|
|
|
<command>postkick</command>, <command>postlock</command>,
|
|
|
|
<command>postlog</command>, <command>postmap</command>,
|
|
|
|
<command>postqueue</command>, <command>postsuper</command>,
|
|
|
|
<filename>qmgr</filename>, <filename>qmqpd</filename>,
|
|
|
|
<command>sendmail</command>, <command>showq</command>,
|
|
|
|
<filename>smtp</filename>, <filename>smtpd</filename>,
|
|
|
|
<filename>spawn</filename>, <filename>trivial-rewrite</filename>,
|
|
|
|
and <filename>virtual</filename>.</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2><title>Description</title>
|
|
|
|
|
|
|
|
<sect3><title>postfix</title>
|
|
|
|
<para><command>postfix</command> is the program that starts and stops the mail delivery system.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>master</title>
|
|
|
|
<para><filename>master</filename> is the resident process that runs
|
|
|
|
<filename>bounce</filename>, <filename>cleanup</filename>,
|
|
|
|
<filename>error</filename>, <filename>flush</filename>,
|
|
|
|
<filename>lmtp</filename>, <filename>local</filename>,
|
|
|
|
<filename>nqmgr</filename>, <filename>pickup</filename>,
|
|
|
|
<filename>pipe</filename>, <filename>qmgr</filename>,
|
|
|
|
<filename>qmqpd</filename>, <filename>showq</filename>,
|
|
|
|
<filename>smtp</filename>, <filename>smtpd</filename>,
|
|
|
|
<filename>spawn</filename>, <filename>trivial-rewrite</filename> and
|
|
|
|
<filename>virtual</filename> on demand. These programs are not designed to
|
|
|
|
work as user commands.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>postqueue</title>
|
|
|
|
<para><command>postqueue</command> implements the
|
|
|
|
<application>Postfix</application> user interface for
|
|
|
|
queue management. It implements all the operations that are traditionally
|
|
|
|
available via the <command>sendmail</command> command.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>sendmail</title>
|
|
|
|
<para><command>sendmail</command> implements the
|
|
|
|
<application>Postfix</application> to
|
|
|
|
<application>Sendmail</application> compatibility interface.
|
|
|
|
<filename class="symlink">mailq</filename> and <filename
|
|
|
|
class="symlink">newaliases</filename> are symlinks to
|
|
|
|
<command>sendmail</command>.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>showq</title>
|
|
|
|
<para><command>showq</command> will emulate the <filename
|
|
|
|
class="symlink">mailq</filename> command when the
|
|
|
|
<application>Postfix</application> mail system is
|
|
|
|
not running.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>postsuper</title>
|
|
|
|
<para><command>postsuper</command> does maintenance jobs on the
|
|
|
|
<application>Postfix</application> queue.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>postalias</title>
|
|
|
|
<para><command>postalias</command> creates, queries or updates
|
|
|
|
<application>Postfix</application> alias
|
|
|
|
databases.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>postcat</title>
|
|
|
|
<para><command>postcat</command> prints the contents of a
|
|
|
|
<application>Postfix</application> queue file in human-readable
|
|
|
|
form.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>postconf</title>
|
|
|
|
<para><command>postconf</command> prints or changes the value of configuration
|
|
|
|
parameters.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>postdrop</title>
|
|
|
|
<para><command>postdrop</command> creates a file in the maildrop directory and
|
|
|
|
copies its standard input to the file.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>postkick</title>
|
|
|
|
<para><command>postkick</command> makes the mail system private
|
|
|
|
<acronym>IPC</acronym> accessible for use in shell
|
|
|
|
scripts.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>postlock</title>
|
|
|
|
<para><command>postlock</command> locks a file for exclusive access and
|
|
|
|
executes a command on that file.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>postlog</title>
|
|
|
|
<para><command>postlog</command> implements a logging interface for use in
|
|
|
|
shell scripts.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>postmap</title>
|
|
|
|
<para><command>postmap</command> creates, queries or updates
|
|
|
|
<application>Postfix</application> lookup tables.</para></sect3>
|
|
|
|
|
|
|
|
</sect2>
|
2002-07-08 04:28:42 +08:00
|
|
|
|
|
|
|
</sect1>
|
|
|
|
|