3 # postfix This shell script takes care of starting and stopping
6 # chkconfig: 2345 80 30
7 # description: Postfix is a Mail Transport Agent, which is the program
8 # that moves mail from one machine to another.
10 # Source function library.
11 . /etc/rc.d/init.d/functions
13 # Source networking configuration.
14 . /etc/sysconfig/network
16 # Check that networking is up.
17 [ "${NETWORKING}" = "no" ] && exit 0
19 [ -f /usr/sbin/postfix ] || exit 0
21 # See how we were called.
25 show "Starting postfix: "
29 if /usr/sbin/postfix start 2>/dev/null; then
34 touch /var/lock/subsys/postfix
38 show "Shutting down postfix: "
40 if /usr/sbin/postfix stop 2>/dev/null; then
45 rm -f /var/lock/subsys/postfix
52 /usr/sbin/postfix reload
58 for I in access canonical relocated transport virtual
60 if [ -f /etc/mail/$I ] ; then
61 /usr/sbin/postmap hash:/etc/mail/$I < /etc/mail/$I
66 echo "Usage: $0 {start|stop|restart|reload|status}"