From patchwork Sat May 4 13:05:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 7766 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4VWnwF0hKTz3wvT for ; Sat, 4 May 2024 13:05:33 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4VWnw9310Bztw; Sat, 4 May 2024 13:05:29 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4VWnw86bTKz2ylf; Sat, 4 May 2024 13:05:28 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4VWnw51xTdz2xv0 for ; Sat, 4 May 2024 13:05:25 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4VWnw41G4tznw; Sat, 4 May 2024 13:05:24 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1714827924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5sN/IAR13vOTX54wfPPTsshj8R/R6vTYkIiQh20B5XQ=; b=OiDvkylmPwuUvHSU8xcisiy+KxxjdbdYKhodUd30YOhzF/Whr/DcigDLLFyCgkrfn2oSc1 h+MEOTFl5x04E3Aw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1714827924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5sN/IAR13vOTX54wfPPTsshj8R/R6vTYkIiQh20B5XQ=; b=PMcOAS3YY++vV4WLmAwvXK5yzGQRwkfNkfV/rKBSHft+vBEjj1rso4H9b9mbSLBIReIzFc Lc+2EaPmOtMG7UNTameqbwQiFhFnaqVShDDjkoCwGZcH2LxgNpsvEHmOLPeMsT7ICmZynj sYSSaiD3q+WBt6ObcUsJMSe/W5CVft2oCc8UPCXRMwMhJEAj3/TtSQylEYkyEHA1//o3Nb gTYvgmEfg7WUaSchZds36xwCjAmUSuYkp3tSQnonjpQ+mpDxwqckZuf4PaT5FteMzhWkiX GJiNWkhHS69oF9esP5odqLL/Z6hcR5ONJW5sdxI4hHMXoWkHTozjn3CxSSb41A== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] update.sh: Add SPAMHAUS_DROP if SPAMHAUS_EDROP was previously used Date: Sat, 4 May 2024 15:05:20 +0200 Message-ID: <20240504130520.4328-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: ERXQJEQ6HAFG26F6XRLMN3LXK2EE5PFE X-Message-ID-Hash: ERXQJEQ6HAFG26F6XRLMN3LXK2EE5PFE X-MailFrom: adolf.belka@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - I realised that the previous patch for update.sh related to the ipblocklist removal of ALIENVAULT and SPAMHAUS_EDROP only removed the SPAMHAUS_EDROP setting. It makes sense to add SPAMHAUS_DROP to the settings file if SPAMHAUS_EDROP was previously used and SPAMHAUS_DROP was not selected. - This patch adds the above change. Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- config/rootfiles/core/186/update.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/rootfiles/core/186/update.sh b/config/rootfiles/core/186/update.sh index 444b041a4..5d7add89f 100644 --- a/config/rootfiles/core/186/update.sh +++ b/config/rootfiles/core/186/update.sh @@ -141,6 +141,7 @@ fi # Remove any entry for ALIENVAULT or SPAMHAUS_EDROP from the ipblocklist modified file # and the associated ipblocklist files from the /var/lib/ipblocklist directory +# If SPAMHAUS_EDROP was used and SPAMHAUS_DROP not used then add SPAMHAUS_DROP to settings file sed -i '/ALIENVAULT=/d' /var/ipfire/ipblocklist/modified sed -i '/SPAMHAUS_EDROP=/d' /var/ipfire/ipblocklist/modified if [ -e /var/lib/ipblocklist/ALIENVAULT.conf ]; then @@ -148,6 +149,9 @@ if [ -e /var/lib/ipblocklist/ALIENVAULT.conf ]; then fi if [ -e /var/lib/ipblocklist/SPAMHAUS_EDROP.conf ]; then rm /var/lib/ipblocklist/SPAMHAUS_EDROP.conf + if [ ! -e /var/lib/ipblocklist/SPAMHAUS_DROP.conf ]; then + echo "SPAMHAUS_DROP=on" >> /var/ipfire/ipblocklist/settings + fi fi # This update needs a reboot...