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