1 | <sect2>
|
---|
2 | <title>Configuring exim</title>
|
---|
3 |
|
---|
4 | <sect3><title>Config files</title>
|
---|
5 | <para><userinput>/etc/exim.conf, /etc/aliases</userinput></para>
|
---|
6 | </sect3>
|
---|
7 |
|
---|
8 | <sect3><title>Configuration of exim</title>
|
---|
9 | <para>Create the exim configuration files with the following commands:
|
---|
10 | </para>
|
---|
11 | <para><screen><userinput>cat >> /etc/aliases << "EOF"
|
---|
12 | postmaster: root
|
---|
13 | MAILER-DAEMON: root
|
---|
14 | EOF
|
---|
15 | exim -v -bi
|
---|
16 | /usr/sbin/exim -bd -q1m</userinput></screen></para>
|
---|
17 |
|
---|
18 | <note><para>To protect an existing <filename>/etc/aliases</filename>
|
---|
19 | file, we will append these aliases to it if it exists. This file
|
---|
20 | should be checked and duplicate aliases removed, if
|
---|
21 | present.</para></note>
|
---|
22 |
|
---|
23 |
|
---|
24 | <para>To start and stop exim on system boot/shutdown create the
|
---|
25 | exim boot script with the following commands: </para>
|
---|
26 |
|
---|
27 | <para><screen><userinput>cat > /etc/rc.d/init.d/exim << "EOF"</userinput>
|
---|
28 | #!/bin/sh
|
---|
29 | # Begin $rc_base/init.d/exim
|
---|
30 |
|
---|
31 | # Based on sysklogd script from LFS-3.1 and earlier.
|
---|
32 | # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
---|
33 |
|
---|
34 | source /etc/sysconfig/rc
|
---|
35 | source $rc_functions
|
---|
36 |
|
---|
37 | case "$1" in
|
---|
38 |
|
---|
39 | start)
|
---|
40 | echo "Starting exim..."
|
---|
41 | loadproc /usr/sbin/exim -bd -q1m
|
---|
42 | ;;
|
---|
43 |
|
---|
44 | stop)
|
---|
45 | echo "Stopping exim..."
|
---|
46 | killproc exim
|
---|
47 | ;;
|
---|
48 |
|
---|
49 | status)
|
---|
50 | statusproc exim
|
---|
51 | ;;
|
---|
52 |
|
---|
53 | restart)
|
---|
54 | $0 stop
|
---|
55 | sleep 1
|
---|
56 | $0 start
|
---|
57 | ;;
|
---|
58 |
|
---|
59 | *)
|
---|
60 | echo "Usage: $0 {start|stop|status|restart}"
|
---|
61 | exit 1
|
---|
62 | ;;
|
---|
63 | esac
|
---|
64 |
|
---|
65 | # End $rc_base/init.d/exim
|
---|
66 | <userinput>EOF
|
---|
67 | chmod 755 /etc/rc.d/init.d/exim</userinput></screen></para>
|
---|
68 |
|
---|
69 | <para>Create the run level symlinks with the following commands:
|
---|
70 | </para>
|
---|
71 | <para>
|
---|
72 | <screen><userinput>cd /etc/rc.d/init.d &&
|
---|
73 | ln -sf ../init.d/exim ../rc0.d/K25exim &&
|
---|
74 | ln -sf ../init.d/exim ../rc1.d/K25exim &&
|
---|
75 | ln -sf ../init.d/exim ../rc2.d/K25exim &&
|
---|
76 | ln -sf ../init.d/exim ../rc3.d/S35exim &&
|
---|
77 | ln -sf ../init.d/exim ../rc4.d/S35exim &&
|
---|
78 | ln -sf ../init.d/exim ../rc5.d/S35exim &&
|
---|
79 | ln -sf ../init.d/exim ../rc6.d/K25exim</userinput></screen></para>
|
---|
80 | </sect3>
|
---|
81 |
|
---|
82 | </sect2>
|
---|