/usr/share/spampd/process_arguments.sh is in spampd 2.42-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | #!/bin/sh -e
#
# process /etc/defaults/spampd and create environment file for systemd service
#
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
if [ -f /etc/default/spampd ]; then
. /etc/default/spampd
fi
istrue () {
ANS=$(echo $1 | tr A-Z a-z)
[ "$ANS" = 'yes' -o "$ANS" = 'true' -o "$ANS" = 'enable' -o "$ANS" = '1' ]
}
#
# Calculate commandline options
# always set PIDFile for systemd
#
ARGS="--pid=/var/run/spampd/spampd.pid"
istrue "$TAGALL" && ARGS="${ARGS} --tagall"
istrue "$AUTOWHITELIST" && ARGS="${ARGS} --auto-whitelist"
istrue "$LOCALONLY" && ARGS="${ARGS} --L"
istrue "$LOGINET" && LOGTARGET="inet" || LOGTARGET="unix"
[ -n "${LISTENPORT}" ] && ARGS="${ARGS} --port=${LISTENPORT}"
[ -n "${LISTENHOST}" ] && ARGS="${ARGS} --host=${LISTENHOST}"
[ -n "${DESTPORT}" ] && ARGS="${ARGS} --relayport=${DESTPORT}"
[ -n "${DESTHOST}" ] && ARGS="${ARGS} --relayhost=${DESTHOST}"
[ -n "${CHILDREN}" ] && ARGS="${ARGS} --children=${CHILDREN}"
[ -n "${LOGTARGET}" ] && ARGS="${ARGS} --logsock=${LOGTARGET}"
[ -n "${ADDOPTS}" ] && ARGS="${ARGS} ${ADDOPTS}"
# if USERID or GRPID are not set, set them to spampd's default
if [ -n "${USERID}" ]; then
ARGS="${ARGS} --user=${USERID}"
else
USERID=mail
fi
if [ -n "${GRPID}" ]; then
ARGS="${ARGS} --group=${GRPID}"
else
GRPID=mail
fi
[ -d /var/run/spampd ] || mkdir /var/run/spampd
chown ${USERID}.${GRPID} /var/run/spampd
echo 'SPAMPD_ARGS = "'${ARGS}'"' > /var/run/spampd/spampd.arguments
exit 0
|