a102b993db
A Trapit is a fake SMTP server that tries to waste as much resources of a spam-relay as possible - without delivering any mail. Implemented for pf, but might work with other ip filters as well. mail/relaydb is a fine tool to utilize spamd. PR: ports/57365 Submitted by: Max Laier <max@love2party.net>
40 lines
808 B
Bash
40 lines
808 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD: /tmp/pcvs/ports/mail/spamd/files/Attic/spamd.sh.sample,v 1.1 2003-09-29 23:01:21 edwin Exp $
|
|
|
|
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
|
echo "$0: Cannot determine the PREFIX" >&2
|
|
echo "Please use the complete pathname." >&2
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "${source_rc_confs_defined}" ]; then
|
|
if [ -r /etc/defaults/rc.conf ]; then
|
|
. /etc/defaults/rc.conf
|
|
source_rc_confs
|
|
elif [ -r /etc/rc.conf ]; then
|
|
. /etc/rc.conf
|
|
fi
|
|
fi
|
|
|
|
case "$1" in
|
|
start)
|
|
case "${spamd_enable}" in
|
|
[Yy][Ee][Ss])
|
|
echo -n ' spamd'
|
|
${PREFIX}/libexec/spamd ${spamd_flags}
|
|
if [ -x ${PREFIX}/sbin/spamd-setup ]; then
|
|
${PREFIX}/sbin/spamd-setup
|
|
fi
|
|
;;
|
|
esac
|
|
;;
|
|
stop)
|
|
killall spamd
|
|
;;
|
|
*)
|
|
echo "Usage: `basename $0` {start|stop}" >&2
|
|
;;
|
|
esac
|
|
|
|
exit 0
|