glfs/server/mail/postfix.xml

259 lines
10 KiB
XML
Raw Normal View History

<?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;
<!ENTITY postfix-download-http "http://www.mirrorspace.org/postfix/official/postfix-&postfix-version;.tar.gz">
<!ENTITY postfix-download-ftp "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-&postfix-version;.tar.gz">
<!ENTITY postfix-size "1.9 MB">
<!ENTITY postfix-buildsize "81 MB">
<!ENTITY postfix-time "0.29 SBU">
]>
<sect1 id="postfix" xreflabel="Postfix-&postfix-version;">
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<?dbhtml filename="postfix.html"?>
<title>Postfix-&postfix-version;</title>
<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><xref linkend="pcre"/>, <xref linkend="cyrus-sasl"/> and <xref linkend="mysql"/></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 &amp;&amp;
groupadd postdrop &amp;&amp;
groupadd -g 65534 nogroup &amp;&amp;
useradd -c postfix -d /dev/null -g postfix -s /bin/false postfix &amp;&amp;
useradd -c nobody -d /home -g nogroup -s /bin/bash -u 65534 nobody &amp;&amp;
chown postfix:postfix /var/mail</command></userinput></screen>
<para>Install <application>postfix</application> by running the following commands:</para>
<screen><userinput><command>make &amp;&amp;
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
the following commands:</para>
<screen><userinput><command>install -d /usr/share/doc/postfix &amp;&amp;
cp -rf html/* /usr/share/doc/postfix</command></userinput></screen>
</sect2>
<sect2>
<title>Command explanations</title>
<para><command>sh postfix-install ... -non-interactive</command> : This keeps
the install script from asking any questions, thereby accepting default
destination directories in all but the three cases explicitly mention.</para>
<para><command>make CCARGS="$CCARGS -DHAS_MYSQL
-I/usr/include/mysql" \</command></para>
<para><command>AUXLIBS="$AUXLIBS -L/usr/lib/mysql -lmysqlclient -lz
-l"</command> : This will allow you to build postfix with MySQL
support.</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 &gt;&gt; /etc/aliases &lt;&lt; "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, the
above command appends 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>sed -i "s/LOGIN/<replaceable>[user]</replaceable>/" /etc/aliases &amp;&amp;
sed -i "s/#myhostname = host.domain.tld/myhostname = \
<replaceable>[localhost.localdomain]</replaceable>/" /etc/postfix/main.cf &amp;&amp;
/usr/bin/newaliases &amp;&amp;
/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
<command>bounce</command>, <command>cleanup</command>,
<command>error</command>, <command>flush</command>,
<command>lmtp</command>, <command>local</command>,
<command>mailq</command>, <command>master</command>,
<command>newaliases</command>, <command>nqmgr</command>,
<command>pickup</command>, <command>pipe</command>,
<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>, <command>qmgr</command>,
<command>qmqpd</command>, <command>sendmail</command>,
<command>showq</command>, <command>smtp</command>,
<command>smtpd</command>, <command>spawn</command>,
<command>trivial-rewrite</command>, and <command>virtual</command>.</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><command>master</command> 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>
</sect1>