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