summaryrefslogtreecommitdiff
path: root/mail/spampd/files/spampd.in
blob: b55059fdfaf0ac0daebd863f0b91fd7ae8884713 (plain) (blame)
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
#!/bin/sh
#
# PROVIDE: spampd
# REQUIRE: LOGIN
# BEFORE: mail
# KEYWORD: shutdown
#
# Add the fellowing line to /etc/rc.conf to enable spampd:
#
# spampd_enable (bool):		Set it to "YES" to enable spampd
#				Default is "NO"
# spampd_flags:			Flags to spampd
# spampd_extra_flags:		Additional flags, so one can
#                               keep defaults in spampd_flags, e.g.
#                               spampd_extra_flags="--sef" to add
#                               "X-Envelope-From" header.

. /etc/rc.subr

name="spampd"
rcvar=spampd_enable

: ${spampd_enable="NO"}
: ${spampd_pidfile="/var/run/spamd/spampd.pid"}
: ${spampd_flags="--user=spamd --group=spamd --homedir=/var/spool/spamd --host=127.0.0.1:10025 --relayhost=127.0.0.1:10026 --dose --tagall"}
load_rc_config $name

command="%%PREFIX%%/sbin/$name"
command_args="--setsid --pid=${spampd_pidfile} ${spampd_extra_flags}"
command_interpreter="%%PERL%% -T"
pidfile="${spampd_pidfile}"

run_rc_command $1