mirror of
https://git.freebsd.org/ports.git
synced 2025-06-28 08:00:31 -04:00
- Runs as dspam:dspam instead of root:mail. The dspam UID/GID were created in r168311 when the UIDs/GIDs files were added but the port had always used root:mail. This had prevented running the dspam webUI under Apache with suexec due to a minimal requirement of UID/GID of 100. The original unsecure behavior is available with the SETUID option. - Default run directory is now /var/run/dspam. This follows the default upstream behavior and removes the patch to dspam.c as a result. Use RUN_DIR and correct the dspam.conf.sample file accordingly. - Default daemon/client communication port is now 2424. - Regen patches while here (portlint) UPDATING: Document privilege separated dspam PR: 115957 Reported by: tedm@ipinc.net, support@ipinc.net Submitted by: Danny Warren <danny@dannywarren.com> (maintainer)
55 lines
982 B
Bash
55 lines
982 B
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: dspam
|
|
# REQUIRE: DAEMON %%MYSQL%% %%PGSQL%% %%CLAMD%%
|
|
# BEFORE: mail
|
|
# KEYWORD: shutdown
|
|
|
|
#
|
|
# Add the following lines to /etc/rc.conf[.local] to enable dspam:
|
|
# dspam_enable="YES"
|
|
#
|
|
# dspam_debug="YES" will start dspam with debug logging (you need ar least WITH_DEBUG)
|
|
# you can also set the pid file via dspam_pidfile
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="dspam"
|
|
rcvar=dspam_enable
|
|
|
|
load_rc_config $name
|
|
|
|
#defaults
|
|
: ${dspam_enable="NO"}
|
|
: ${dspam_debug="NO"}
|
|
: ${dspam_pidfile:-/var/run/dspam/dspam.pid}
|
|
: ${dspam_user="%%DSPAM_OWNER%%"}
|
|
: ${dspam_group="%%DSPAM_GROUP%%"}
|
|
|
|
command=%%PREFIX%%/bin/${name}
|
|
|
|
start_precmd=dspam_checkdebug
|
|
extra_commands=reload
|
|
|
|
required_dirs=%%DSPAM_HOME%%
|
|
required_files=%%PREFIX%%/etc/${name}.conf
|
|
|
|
dspam_checkdebug()
|
|
{
|
|
if checkyesno dspam_debug
|
|
then
|
|
command_args="--daemon --debug > /dev/null 2>&1 &"
|
|
else
|
|
command_args="--daemon > /dev/null 2>&1 &"
|
|
fi
|
|
}
|
|
|
|
reload()
|
|
{
|
|
kill -HUP `cat $pidfile`
|
|
}
|
|
|
|
run_rc_command "$1"
|