]> Frank Brehm's Git Trees - config/helga/etc.git/commitdiff
saving uncommitted changes in /etc prior to emerge run
authorroot <root@helga.brehm-online.com>
Sat, 7 Jan 2017 13:08:47 +0000 (14:08 +0100)
committerroot <root@helga.brehm-online.com>
Sat, 7 Jan 2017 13:08:47 +0000 (14:08 +0100)
.etckeeper
conf.d/spamd
init.d/spamd
mail/spamassassin/local.cf
mail/spamassassin/v341.pre [new file with mode: 0644]

index b39fb9ced03be749ec6196b115585e1a798a54e7..7e7b1ef9fc5236a9ae7e30361757d248ff7b6d85 100755 (executable)
@@ -1869,6 +1869,7 @@ maybe chmod 0644 'mail/spamassassin/v312.pre'
 maybe chmod 0644 'mail/spamassassin/v320.pre'
 maybe chmod 0644 'mail/spamassassin/v330.pre'
 maybe chmod 0644 'mail/spamassassin/v340.pre'
+maybe chmod 0644 'mail/spamassassin/v341.pre'
 maybe chmod 0644 'mailcap'
 maybe chmod 0755 'makedev.d'
 maybe chmod 0644 'makedev.d/00macros'
index b3cd1acd8fa3a4b303613072579b0ab3f5ade085..0cb7cbbfc4718f44826bd0858a3864bda91a9380 100644 (file)
@@ -1,46 +1,25 @@
 # Config file for /etc/init.d/spamd
-
-
+#
 # ***WARNING***
+#
 # spamd was not designed to listed to an untrusted network. spamd
 # is vulnerable to DoS attacks (and eternal doom) if used to listen
 # to an untrusted network.
 #
-
-
-# Some options:
-#
-# -c          to create a per user configuration file
-# -H [dir]    to switch home dirs for helper apps, dir optional
-# -i [ip]     to listen on the specified IP,
-#             127.0.0.1 if omitted,
-#             0.0.0.0 (ie. all) if given without value;
-#             must be used in combination with -A to actually allow
-#             connections from anybody but localhost
-# -m limit    to set the number of children, default 5
-# -u user     the user to run spamd as
-# -L          if you want to run no net tests
-#
-# for more help look in man spamd
-#
-# Note: if you plan on using the -u flag to spamd you will need to
-# make sure the location of the PID file is writable by that user.
-# This can be done by making the directory /var/run/spamd and
-# changing the owner to the UID that runs spamd.  You will then
-# need to edit $pidfile in /etc/init.d/spamd. This should fix the
-# problem with stop/restart in the init scripts.
+# ***WARNING***
 #
-# See http://bugs.gentoo.org/show_bug.cgi?id=70124 for a full
-# explanation.
-
-SPAMD_OPTS="-m 5 -c -H"
-
-# spamd stores its pid in this file. If you use the -u option to
-# run spamd under another user, you might need to adjust it.
 
-PIDFILE="/run/spamd.pid"
+# Additional options to pass to the spamd daemon. The spamd(1) man
+# page explains the available options. If you choose to listen on a
+# non-default interface, you will need to use OpenRC's "rc_need"
+# mechanism to ensure that your interface comes up before spamd
+# starts. The openrc-run(8) man page describes rc_need.
+SPAMD_OPTS="--max-children=5 --create-prefs --helper-home-dir"
 
-# SPAMD_NICELEVEL lets you set the 'nice'ness of the running 
-# spamd process
+# Sets the 'nice' level of the spamd process.
+SPAMD_NICELEVEL=0
 
-# SPAMD_NICELEVEL=5
+# How long (in seconds) should we wait for spamd to stop after we've
+# asked it to? After this amount of time, if spamd is still running,
+# we will assume that it has failed to stop.
+SPAMD_TIMEOUT=15
index fa72229c7ea023a67e2901ab2285d1e224e245e5..f27c211054ce821b76a7d46128004512b6e9ea54 100755 (executable)
@@ -3,15 +3,12 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-# NB: Config is in /etc/conf.d/spamd
-
-# Provide a default location if they haven't in /etc/conf.d/spamd
-PIDFILE=${PIDFILE:-/run/spamd.pid}
+PIDDIR=/run/spamd
+PIDFILE=${PIDDIR}/spamd.pid
 
 extra_started_commands="reload"
 
 depend() {
-       need net
        before mta
        use logger
        use postgresql
@@ -20,27 +17,40 @@ depend() {
 
 start() {
        ebegin "Starting spamd"
+
+       # Ensure that the PID file's directory exists.
+       checkpath --directory "${PIDDIR}"
+
+       # Reloading spamd causes its PID to change, so we track it by
+       # name instead.
        start-stop-daemon --start --quiet \
                --name spamd \
-               --nicelevel ${SPAMD_NICELEVEL:-0} \
+               --nicelevel ${SPAMD_NICELEVEL} \
                --pidfile ${PIDFILE} \
-               --exec /usr/sbin/spamd -- -d -r ${PIDFILE} \
-               ${SPAMD_OPTS}
+               --exec /usr/sbin/spamd -- \
+                       --daemonize \
+                       --pidfile=${PIDFILE} \
+                       ${SPAMD_OPTS}
+
        retval=$?
-       if ! [ -f "${PIDFILE}" ]; then
-               sleep 1
-       fi
+
        eend ${retval} "Failed to start spamd"
 }
 
 stop() {
        ebegin "Stopping spamd"
-       start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+       # Retry after SPAMD_TIMEOUT seconds because spamd can take a
+       # while to kill off all of its children. This was bug 322025.
+       start-stop-daemon --stop \
+                         --quiet \
+                         --retry ${SPAMD_TIMEOUT} \
+                         --pidfile ${PIDFILE}
        eend $? "Failed to stop spamd"
 }
 
 reload() {
        ebegin "Reloading configuration"
+       # Warning: causes the PID of the spamd process to change.
        start-stop-daemon --signal HUP --quiet --pidfile ${PIDFILE}
        eend $?
 }
index a40b217a174ef29a5c692408e4ee1db6abcb8d58..95bc49419cf6d8f3b401cd46408d840f0eaeca95 100644 (file)
 # bayes_ignore_header X-Spam-Status
 
 
+#   Whether to decode non- UTF-8 and non-ASCII textual parts and recode
+#   them to UTF-8 before the text is given over to rules processing.
+#
+# normalize_charset 1
+
 #   Some shortcircuiting, if the plugin is enabled
 # 
 ifplugin Mail::SpamAssassin::Plugin::Shortcircuit
diff --git a/mail/spamassassin/v341.pre b/mail/spamassassin/v341.pre
new file mode 100644 (file)
index 0000000..489dd4c
--- /dev/null
@@ -0,0 +1,28 @@
+# This is the right place to customize your installation of SpamAssassin.
+#
+# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
+# tweaked.
+#
+# This file was installed during the installation of SpamAssassin 3.4.1,
+# and contains plugin loading commands for the new plugins added in that
+# release.  It will not be overwritten during future SpamAssassin installs,
+# so you can modify it to enable some disabled-by-default plugins below,
+# if you so wish.
+#
+# There are now multiple files read to enable plugins in the
+# /etc/mail/spamassassin directory; previously only one, "init.pre" was
+# read.  Now both "init.pre", "v310.pre", and any other files ending in
+# ".pre" will be read.  As future releases are made, new plugins will be
+# added to new files, named according to the release they're added in.
+###########################################################################
+
+# TxRep - Reputation database that replaces AWL
+# loadplugin Mail::SpamAssassin::Plugin::TxRep
+
+# URILocalBL - Provides ISP and Country code based filtering as well as
+# quick IP based blocks without a full RBL implementation - Bug 7060
+
+# loadplugin Mail::SpamAssassin::Plugin::URILocalBL
+
+# PDFInfo - Use several methods to detect a PDF file's ham/spam traits
+# loadplugin Mail::SpamAssassin::Plugin::PDFInfo