summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-07-19 17:49:09 +0000
committerStef Walter <stef@memberwebs.com>2004-07-19 17:49:09 +0000
commit7193299b2407a4ff6cea4c25a217857ace27f1e7 (patch)
tree8946b0c96b63961223f2cfdfb74a9f09d675c1ba /scripts
parentaba21d50ab7e88a05f17de05ba5dedab58a29616 (diff)
Miscellaneous fixes (lost track).
Diffstat (limited to 'scripts')
-rw-r--r--scripts/clamsmtpd.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/scripts/clamsmtpd.sh b/scripts/clamsmtpd.sh
new file mode 100644
index 0000000..c574e8b
--- /dev/null
+++ b/scripts/clamsmtpd.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+###########################################################################
+# CONFIGURATION
+
+# The outgoing SMTP server (CHANGE THIS)
+smtp=mysmtp.com:25
+
+# Directory for temporary files (CHANGE THIS)
+tmpdir=/var/tmp
+
+# The user to run as
+user=clamav
+
+# The prefix clamsmtpd was installed to
+prefix=/usr/local/
+
+# The location for pid file
+piddir=/var/run/clamav/
+
+# The clamd socket
+clamsock=/var/run/clamav/clamd
+
+
+###########################################################################
+# SCRIPT
+
+case $1 in
+start)
+ mkdir -p $piddir
+ chown $user $piddir
+ su -m $user -c "$prefix/sbin/clamsmtpd -c $clamsock -D $tmpdir -p $piddir/clamsmtpd.pid $smtp"
+ echo -n "clam-smtpd "
+ ;;
+stop)
+ [ -f $piddir/clamsmtpd.pid ] && kill `cat $piddir/clamsmtpd.pid`
+ echo -n "clam-smtpd "
+ ;;
+*)
+ echo "usage: clamsmptd.sh {start|stop}" >&2
+ ;;
+esac