spamassassin/rc.spamassassin

Sat, 24 Mar 2012 21:40:49 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 24 Mar 2012 21:40:49 +0100
changeset 414
fd611cde817f
parent 191
d980506f80fc
permissions
-rw-r--r--

Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.

michael@191 1 #!@l_prefix@/bin/openpkg rc
michael@191 2 ##
michael@191 3 ## rc.spamassassin -- Run-Commands
michael@191 4 ##
michael@191 5
michael@191 6 %config
michael@191 7 spamassassin_enable="$openpkg_rc_def"
michael@191 8 spamassassin_bind="127.0.0.1"
michael@191 9 spamassassin_port="783"
michael@192 10 spamassassin_flags="-x -u @l_rusr@ -A 127. --local --virtual-config-dir=@l_prefix@/var/spamassassin/spool/%u"
michael@191 11 spamassassin_stop_delay="2"
michael@191 12 spamassassin_log_prolog="true"
michael@191 13 spamassassin_log_epilog="true"
michael@191 14 spamassassin_log_numfiles="10"
michael@191 15 spamassassin_log_minsize="1M"
michael@191 16 spamassassin_log_complevel="9"
michael@191 17
michael@191 18 %common
michael@191 19 spamassassin_etcdir="@l_prefix@/etc/spamassassin"
michael@191 20 spamassassin_pidfile="@l_prefix@/var/spamassassin/spamassassin.pid"
michael@191 21 spamassassin_logfile="@l_prefix@/var/spamassassin/spamassassin.log"
michael@191 22 spamassassin_signal () {
michael@191 23 [ -f $spamassassin_pidfile ] && kill -$1 `cat $spamassassin_pidfile`
michael@191 24 }
michael@191 25
michael@191 26 %status -u @l_susr@ -o
michael@191 27 spamassassin_usable="unknown"
michael@191 28 spamassassin_active="no"
michael@191 29 rcService spamassassin enable yes && \
michael@191 30 spamassassin_signal 0 && spamassassin_active="yes"
michael@191 31 echo "spamassassin_enable=\"$spamassassin_enable\""
michael@191 32 echo "spamassassin_usable=\"$spamassassin_usable\""
michael@191 33 echo "spamassassin_active=\"$spamassassin_active\""
michael@191 34
michael@191 35 %start -p 400 -u @l_susr@
michael@191 36 rcService spamassassin enable yes || exit 0
michael@191 37 rcService spamassassin active yes && exit 0
michael@191 38 @l_prefix@/bin/spamd \
michael@191 39 --daemonize \
michael@191 40 --siteconfigpath="${spamassassin_etcdir}" \
michael@191 41 --pidfile="${spamassassin_pidfile}" \
michael@191 42 --syslog="${spamassassin_logfile}" \
michael@191 43 --listen-ip="${spamassassin_bind}" \
michael@191 44 --port="${spamassassin_port}" \
michael@191 45 ${spamassassin_flags}
michael@191 46
michael@191 47 %stop -p 400 -u @l_susr@
michael@191 48 rcService spamassassin enable yes || exit 0
michael@191 49 rcService spamassassin active no && exit 0
michael@191 50 spamassassin_signal TERM
michael@191 51 sleep "$spamassassin_stop_delay"
michael@191 52
michael@191 53 %restart -p 600 -u @l_susr@
michael@191 54 rcService spamassassin enable yes || exit 0
michael@191 55 rcService spamassassin active no && exit 0
michael@191 56 rc spamassassin stop
michael@191 57 rc spamassassin start
michael@191 58
michael@191 59 %daily -u @l_susr@
michael@191 60 rcService spamassassin enable yes || exit 0
michael@191 61 shtool rotate -f \
michael@191 62 -n ${spamassassin_log_numfiles} -s ${spamassassin_log_minsize} -d \
michael@191 63 -z ${spamassassin_log_complevel} -o @l_rusr@ -g @l_rgrp@ -m 644 \
michael@191 64 -P "${spamassassin_log_prolog}" \
michael@191 65 -E "${spamassassin_log_epilog}; rc spamassassin restart" \
michael@191 66 $spamassassin_logfile
michael@191 67

mercurial