pkgsrc/mail/policyd-weight/files/policyd_weight.sh
xtraeme 3220d90c6b Initial import of policyd-weight-0.1.14.5, packaged by bartosz at atom.eu.org
via pkgsrc-wip.

policyd-weight is a Perl policy daemon for the Postfix MTA (2.1 and later)
intended to eliminate forged envelope senders and HELOs (i.e. in bogus mails).
It allows you to score DNSBLs (RBL/RHSBL), HELO, MAIL FROM and client IP
addresses before any queuing is done. It allows you to REJECT messages which
have a score higher than allowed, providing improved blocking of spam and
virus mails. policyd-weight caches the most frequent client/sender
combinations (SPAM as well as HAM) to reduce the number of DNS queries.
2007-07-06 13:49:46 +00:00

41 lines
775 B
Bash

#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: policyd_weight.sh,v 1.1.1.1 2007/07/06 13:49:46 xtraeme Exp $
#
# PROVIDE: policyd_weight
# BEFORE: mail
# REQUIRE: DAEMON LOGIN
. /etc/rc.subr
name="policyd_weight"
rcvar=$name
pidfile="@VARBASE@/run/policyd-weight.pid"
command_interpreter="@PREFIX@/bin/perl"
command="@PREFIX@/sbin/policyd-weight"
extra_commands="reload"
required_files="@PKG_SYSCONFDIR@/policyd-weight.conf"
reload_cmd="policyd_weight_op"
restart_cmd="policyd_weight_op"
start_cmd="policyd_weight_op"
stop_cmd="policyd_weight_stop"
policyd_weight_op()
{
${command} ${rc_arg}
}
policyd_weight_stop()
{
${command} -k stop
}
if [ -f /etc/rc.subr -a -f /etc/rc.conf ]; then
load_rc_config $name
run_rc_command "$1"
else
@ECHO@ -n " ${name}"
${command} start
fi