File: Postfix

package info (click to toggle)
postfix 2.3.8-2%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 15,744 kB
  • ctags: 11,426
  • sloc: ansic: 81,810; makefile: 10,743; sh: 7,874; perl: 2,468; awk: 41
file content (46 lines) | stat: -rwxr-xr-x 957 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh

# Gerben Wierda, Oct 2001. Adapted from an existing example. I waive every
# copyright on this and I also do not give any warranty.

# Updated Sepember 29, 2002
# To work properly, the POSTFIX variable needs to be set to -YES-
#	in /etc/hostconfig

. /etc/rc.common

if [ "${POSTFIX:=-NO-}" = "-YES-" -a "${MAILSERVER:=-NO-}" = "-YES-" ]
then
	ConsoleMessage "Cannot run concurrent postfix and sendmail"
	sleep 2
	exit
fi

##
# Start mail server
##

if [ "$1" == "start" ]
then
	if [ "${POSTFIX:=-NO-}" = "-YES-" ]
	then
		ConsoleMessage "Starting Postfix mail services"
		/usr/sbin/postfix start
	fi
elif [ "$1" == "stop" ]
then
	ConsoleMessage "Stopping Postfix mail services"
	/usr/sbin/postfix stop
elif [ "$1" == "restart" ]
then
	if [ "${POSTFIX:=-NO-}" = "-YES-" ]
	then
		ConsoleMessage "Reloading Postfix configuration"
		/usr/sbin/postfix reload
	else
		ConsoleMessage "Stopping Postfix mail services"
		/usr/sbin/postfix stop
	fi
fi