[f45b1953] | 1 | <sect2>
|
---|
[547df0bc] | 2 | <title>Configuring <application>Postfix</application></title>
|
---|
[f45b1953] | 3 |
|
---|
| 4 | <sect3><title>Config files</title>
|
---|
[e80cc95] | 5 | <para><filename>/etc/aliases</filename>,
|
---|
| 6 | <filename>/etc/postfix/main.cf</filename> and
|
---|
| 7 | <filename>/etc/postfix/master.cf</filename></para>
|
---|
[f45b1953] | 8 | </sect3>
|
---|
| 9 |
|
---|
| 10 | <sect3><title>Configuration Information</title>
|
---|
| 11 |
|
---|
[65df9fca] | 12 | <screen><userinput><command>cat >> /etc/aliases << "EOF"</command>
|
---|
[f45b1953] | 13 | # Begin /etc/aliases
|
---|
| 14 |
|
---|
| 15 | MAILER-DAEMON: postmaster
|
---|
| 16 | postmaster: root
|
---|
| 17 |
|
---|
| 18 | root: LOGIN
|
---|
| 19 | # End /etc/aliases
|
---|
[a11e412] | 20 | <command>EOF</command></userinput></screen>
|
---|
[f45b1953] | 21 |
|
---|
[65df9fca] | 22 | <note><para>To protect an existing <filename>/etc/aliases</filename>
|
---|
| 23 | file, we will append these aliases to it if it exists. This file
|
---|
| 24 | should be checked and duplicate aliases removed, if
|
---|
| 25 | present.</para></note>
|
---|
| 26 |
|
---|
| 27 | <para>The <filename>/etc/aliases</filename> file that was just created
|
---|
| 28 | or appended, the <filename>main.cf</filename> and the
|
---|
| 29 | <filename>master.cf</filename>
|
---|
[a11e412] | 30 | must be personalized for your system. The <filename>aliases</filename> file
|
---|
| 31 | needs your non-root login identity so mail addressed to root can be forwarded
|
---|
| 32 | to you at the user level. The <filename>main.cf</filename> file needs your
|
---|
| 33 | fully qualified hostname. All of these edits can be done with sed commands
|
---|
| 34 | entered into the console with appropriate substitutions of your non-root
|
---|
| 35 | login name for <replaceable>[user]</replaceable> and your fully qualified
|
---|
| 36 | hostname for <replaceable>[localhost.localdomain]</replaceable>. You will
|
---|
| 37 | find the <filename>main.cf</filename> file
|
---|
| 38 | is self documenting, so load it into your editor to make the changes you need
|
---|
| 39 | for your situation.</para>
|
---|
| 40 |
|
---|
[8101388] | 41 | <screen><userinput><command>cp /etc/aliases /etc/aliases.bak &&
|
---|
| 42 | cp /etc/postfix/main.cf /etc/postfix/main.cf.bak &&
|
---|
| 43 | sed "s/LOGIN/<replaceable>[user]</replaceable>/" /etc/aliases.bak > /etc/aliases &&
|
---|
[f45b1953] | 44 | sed "s/#myhostname = host.domain.tld/myhostname = \
|
---|
[a11e412] | 45 | <replaceable>[localhost.localdomain]</replaceable>/" \
|
---|
[8101388] | 46 | /etc/postfix/main.cf.bak > /etc/postfix/main.cf &&
|
---|
| 47 | /usr/bin/newaliases &&
|
---|
[a11e412] | 48 | /usr/sbin/postfix start</command></userinput></screen></sect3>
|
---|
[f45b1953] | 49 |
|
---|
[547df0bc] | 50 | <sect3><title>Postfix init.d script</title>
|
---|
[f45b1953] | 51 |
|
---|
[65df9fca] | 52 | <para>To automate the running of Postfix at startup, install the <filename>/etc/rc.d/init.d/postfix</filename>
|
---|
[98d18589] | 53 | init script included in the <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
[f45b1953] | 54 |
|
---|
[98d18589] | 55 | <screen><userinput><command>make install-postfix</command></userinput></screen>
|
---|
[f45b1953] | 56 |
|
---|
| 57 | </sect3>
|
---|
| 58 |
|
---|
| 59 | </sect2>
|
---|