SOURCES: spampd.init (NEW), spampd.sysconfig (NEW) - created

glen glen at pld-linux.org
Wed Jul 27 11:35:56 CEST 2005


Author: glen                         Date: Wed Jul 27 09:35:56 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- created

---- Files affected:
SOURCES:
   spampd.init (NONE -> 1.1)  (NEW), spampd.sysconfig (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/spampd.init
diff -u /dev/null SOURCES/spampd.init:1.1
--- /dev/null	Wed Jul 27 11:35:56 2005
+++ SOURCES/spampd.init	Wed Jul 27 11:35:51 2005
@@ -0,0 +1,72 @@
+#!/bin/sh
+#
+# This script starts and stops the spampd daemon
+#
+# chkconfig: 2345 80 30
+#
+# description: spampd is a daemon process which uses SpamAssassin to check
+#              email messages for SPAM.
+#
+# $Id$
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/spampd ] && . /etc/sysconfig/spampd
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+	if [ ! -f /var/lock/subsys/network ]; then
+		msg_network_down spampd
+		exit 1
+	fi
+else
+	exit 0
+fi
+
+# See how we were called.
+case "$1" in
+  start)
+	# Check if the service is already running?
+	if [ ! -f /var/lock/subsys/spampd ]; then
+		msg_starting spampd
+		daemon spampd --host=$LISTEN --relayhost=$RELAYHOST --children=$MAXCHILD $(is_yes "$TAGALL" && echo --tagall) $SPAMPD_OPTS
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/spampd
+	else
+		msg_already_running spampd
+	fi
+	;;
+  stop)
+	# Stop daemons.
+	if [ -f /var/lock/subsys/spampd ]; then
+		# Stop daemons.
+		msg_stopping spampd
+		killproc spampd
+		rm -f /var/lock/subsys/spampd
+	else
+		msg_not_running spampd
+	fi
+	;;
+  restart)
+	$0 stop
+	$0 start
+	exit $?
+	;;
+  status)
+	status spampd
+	RETVAL=$?
+	;;
+  *)
+	msg_usage "$0 {start|stop|restart|status}"
+	exit 3
+esac
+
+exit $RETVAL
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=4:sw=4

================================================================
Index: SOURCES/spampd.sysconfig
diff -u /dev/null SOURCES/spampd.sysconfig:1.1
--- /dev/null	Wed Jul 27 11:35:56 2005
+++ SOURCES/spampd.sysconfig	Wed Jul 27 11:35:51 2005
@@ -0,0 +1,25 @@
+# Customized settings for spampd 
+
+# Define nice level for spampd 
+SERVICE_RUN_NICE_LEVEL="+0"
+
+# Specifies what hostname/IP and port spampd listens on. By default, it
+# listens on 127.0.0.1 (localhost) on port 10025.
+# Important! You should NOT enable spampd to listen on a public interface (IP
+# address) unless you know exactly what you're doing!
+LISTEN=127.0.0.1:10025
+
+# Specifies the hostname/IP where spampd will relay all messages. Defaults to 127.0.0.1 (localhost).
+# If the port is not provided, that defaults to 25.
+RELAYHOST=127.0.0.1:25
+
+# Number of child servers to start and maintain (where n > 0).
+MAXCHILD=25
+
+# Tells spampd to have SpamAssassin add headers to all scanned mail, not just
+# spam. By default spampd will only rewrite messages which exceed the spam
+# threshold score (as defined in the SA settings).
+TAGALL=yes
+
+# Other daemon options not supported here.
+SPAMPD_OPTS=""
================================================================



More information about the pld-cvs-commit mailing list