mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-09 03:37:18 +08:00
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2060 af4574ff-66df-0310-9fd7-8a98e5e911e0
54 lines
2.1 KiB
XML
54 lines
2.1 KiB
XML
<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>
|
|
|
|
<para>The <filename>/etc/aliases</filename> file that was just created,
|
|
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 <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>
|