From 53c5e253f85a0ed5d9a5826bfee8b77923fbee65 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 25 Oct 2016 18:14:08 +0200 Subject: Fix include internal_networks in trusted_networks. --- spamassassin/local.cf | 4 ++-- spamassassin/local.cf.diff | 6 +++--- spamassassin/tweak.d/networks.sh | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'spamassassin') diff --git a/spamassassin/local.cf b/spamassassin/local.cf index b38075b..96f52e9 100644 --- a/spamassassin/local.cf +++ b/spamassassin/local.cf @@ -21,8 +21,8 @@ report_safe 0 # Set which networks or hosts are considered 'trusted' by your mail # server (i.e. not spammers) # -internal_networks 188.183.5.254/32 127.0.0.1 -trusted_networks 80.68.88.141/32 217.197.91.142 94.18.231.208/29 146.185.137.224 +internal_networks 127.0.0.1 188.183.5.254/32 +trusted_networks 127.0.0.1 188.183.5.254/32 80.68.88.141/32 217.197.91.142 94.18.231.208/29 146.185.137.224 # Set file-locking method (flock is not safe over NFS, but is faster) diff --git a/spamassassin/local.cf.diff b/spamassassin/local.cf.diff index e9f772d..b43925e 100644 --- a/spamassassin/local.cf.diff +++ b/spamassassin/local.cf.diff @@ -1,5 +1,5 @@ --- local.cf.orig 2016-10-24 21:29:10.000000000 +0200 -+++ local.cf 2016-10-25 17:52:26.000000000 +0200 ++++ local.cf 2016-10-25 18:12:59.000000000 +0200 @@ -15,18 +15,19 @@ # Save spam messages as a message/rfc822 MIME attachment instead of # modifying the original message (0: off, 2: use text/plain instead) @@ -12,8 +12,8 @@ # server (i.e. not spammers) # -# trusted_networks 212.17.35. -+internal_networks 188.183.5.254/32 127.0.0.1 -+trusted_networks 80.68.88.141/32 217.197.91.142 94.18.231.208/29 146.185.137.224 ++internal_networks 127.0.0.1 188.183.5.254/32 ++trusted_networks 127.0.0.1 188.183.5.254/32 80.68.88.141/32 217.197.91.142 94.18.231.208/29 146.185.137.224 # Set file-locking method (flock is not safe over NFS, but is faster) diff --git a/spamassassin/tweak.d/networks.sh b/spamassassin/tweak.d/networks.sh index 25ac109..7b4d56b 100755 --- a/spamassassin/tweak.d/networks.sh +++ b/spamassassin/tweak.d/networks.sh @@ -38,6 +38,7 @@ addoroverwritewithindents() { "$file" } +ournets="127.0.0.1" REDPILL=$(firstitem "/etc/local-ORG/redpill") redpilldir="/etc/local-$REDPILL/" REALMS="$(items "$redpilldir/realms")" @@ -47,9 +48,8 @@ for realm in $REALMS; do [ -d "$realmdir" ] || continue mailnets=$(items_singleline "$realmdir/mailnetworks") #' if [ "$REALM" = "$realm" ]; then - ournets="${ournets:+$ournets }$mailnets" + ournets="$ournets $mailnets" [ ! -f "$realmdir/localnetworks" ] || ournets="${ournets:+$ournets }$(items "$realmdir/localnetworks")" - ournets="${ournets:+$ournets }127.0.0.1" else redpillnets="${redpillnets:+$redpillnets }$mailnets" fi @@ -57,4 +57,4 @@ done echo "FIXME: Add these to /etc/spamassassin/local.cf:" echo "internal_networks $ournets" -echo "trusted_networks $redpillnets" +echo "trusted_networks $ournets $redpillnets" -- cgit v1.2.3