source: server/mail/postfix/postfix-config.xml@ 01e843e9

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb v1_0 v5_0 v5_0-pre1 v5_1 v5_1-pre1 xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 01e843e9 was 0566707b, checked in by Larry Lawrence <larry@…>, 21 years ago

updated to postfix-2.0.0.1

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@537 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 3.2 KB
Line 
1<sect2>
2<title>Configuring postfix</title>
3
4<sect3><title>Config files</title>
5<para><userinput>/etc/aliases, /etc/postfix/main.cf</userinput> and <userinput>/etc/postfix/master.cf</userinput></para>
6</sect3>
7
8<sect3><title>Configuration Information</title>
9
10<para><screen><userinput>cat &gt; /etc/aliases &lt;&lt; "EOF"</userinput>
11# Begin /etc/aliases
12
13MAILER-DAEMON: postmaster
14postmaster: root
15
16root: LOGIN
17# End /etc/aliases
18<userinput>EOF</userinput></screen></para>
19
20<para>The /etc/aliases file that was just created, the main.cf and the
21master.cf must be personalized for your system. The aliases file needs your
22non-root login identity so mail addressed to root can be forwarded to
23you at the user level. The main.cf file needs your fully qualified
24hostname. The master.cf needs to be modified to prevent your machine from
25becoming a relay for unauthorized entities. All of these edits can be done
26with sed commands entered into the console with appropriate substitutions of
27your non-root login name for [user] and your fully qualified hostname for
28[localhost.localdomain]. You will find the main.cf file is self documenting, so load it into your editor to make the changes you need for your situation.</para>
29
30<para><screen><userinput>cp /etc/aliases /etc/aliases.bak
31cp /etc/postfix/main.cf /etc/postfix/main.cf.bak
32cp /etc/postfix/master.cf /etc/postfix/master.cf.bak
33sed "s/LOGIN/[user]/" /etc/aliases.bak > /etc/aliases
34sed "s/#myhostname = host.domain.tld/myhostname = \
35 [localhost.localdomain]/" \
36 /etc/postfix/main.cf.bak > /etc/postfix/main.cf
37/usr/bin/newaliases
38/usr/sbin/postfix start</userinput></screen></para></sect3>
39
40<sect3><title>postfix init.d script</title>
41
42<para>To automate the running of postfix, use following command to create the init.d script:</para>
43
44<para><screen><userinput>cat &gt; /etc/rc.d/init.d/postfix &lt;&lt; "EOF"</userinput>
45#!/bin/sh
46# Begin $rc_base/init.d/postfix
47
48# Based on sysklogd script from LFS-3.1 and earlier.
49# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
50
51source /etc/sysconfig/rc
52source $rc_functions
53
54case "$1" in
55
56 start)
57 echo "Starting Postfix..."
58 loadproc postfix start
59 ;;
60
61 stop)
62 echo "Stopping Postfix..."
63 loadproc postfix stop
64 ;;
65
66 reload)
67 echo "Reloading Postfix..."
68 loadproc postfix reload
69 ;;
70
71 restart)
72 $0 stop
73 sleep 1
74 $0 start
75 ;;
76
77 *)
78 echo "Usage: $0 {start|stop|reload|restart}"
79 exit 1
80 ;;
81esac
82
83# End $rc_base/init.d/postfix
84<userinput>EOF
85chmod 755 /etc/rc.d/init.d/postfix</userinput></screen></para>
86
87<para>Create the symbolic links to this file in the relevant rc.d directory with the following commands:
88
89<screen><userinput>cd /etc/rc.d/init.d &amp;&amp;
90ln -sf ../init.d/postfix ../rc0.d/K25postfix &amp;&amp;
91ln -sf ../init.d/postfix ../rc1.d/K25postfix &amp;&amp;
92ln -sf ../init.d/postfix ../rc2.d/K25postfix &amp;&amp;
93ln -sf ../init.d/postfix ../rc3.d/S35postfix &amp;&amp;
94ln -sf ../init.d/postfix ../rc4.d/S35postfix &amp;&amp;
95ln -sf ../init.d/postfix ../rc5.d/S35postfix &amp;&amp;
96ln -sf ../init.d/postfix ../rc6.d/K25postfix</userinput></screen></para>
97</sect3>
98
99</sect2>
Note: See TracBrowser for help on using the repository browser.