[auto-mass-check] Add TRUSTED_NETWORKS and INTERNAL_NETWORKS variables to auto-mass-check
by Nick Bebout
commit 63adabc3e164881013d0bd737a59c8cd84496338
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Fri Jan 28 04:33:50 2011 +0000
Add TRUSTED_NETWORKS and INTERNAL_NETWORKS variables to auto-mass-check
auto-mass-check.cf | 4 ++++
auto-mass-check.sh | 6 ++++++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/auto-mass-check.cf b/auto-mass-check.cf
index 97297e5..8438142 100644
--- a/auto-mass-check.cf
+++ b/auto-mass-check.cf
@@ -10,6 +10,10 @@ WORKDIR=~/masscheckwork
# Generate folders of probable spam for inspection here
# Blank if you with to disable folder generation
CHECKDIR=
+# Leave these blank if you do not want trusted_networks
+# and/or internal_networks to be set
+TRUSTED_NETWORKS=
+INTERNAL_NETWORKS=
run_all_masschecks() {
### sample: single corpus ###
diff --git a/auto-mass-check.sh b/auto-mass-check.sh
index ed9e600..a4f318e 100755
--- a/auto-mass-check.sh
+++ b/auto-mass-check.sh
@@ -25,6 +25,12 @@ setup_masscheck() {
echo "bayes_store_module Mail::SpamAssassin::BayesStore::SDBM" >> spamassassin/user_prefs
echo "use_auto_whitelist 0" >> spamassassin/user_prefs
echo "whitelist_bounce_relays example.com" >> spamassassin/user_prefs
+ if [ -n "${TRUSTED_NETWORKS}" ]; then
+ echo "trusted_networks ${TRUSTED_NETWORKS}" >> spamassassin/user_prefs
+ fi
+ if [ -n "${INTERNAL_NETWORKS}" ]; then
+ echo "internal_networks ${INTERNAL_NETWORKS}" >> spamassassin/user_prefs
+ fi
}
setup_checktype() {
12 years, 2 months