From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 3E7D2922AD for ; Mon, 13 Mar 2023 22:24:42 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1EBB518C2F for ; Mon, 13 Mar 2023 22:24:12 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 13 Mar 2023 22:24:08 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 2EFB745648 for ; Mon, 13 Mar 2023 22:24:08 +0100 (CET) From: Stoiko Ivanov To: pmg-devel@lists.proxmox.com Date: Mon, 13 Mar 2023 22:23:46 +0100 Message-Id: <20230313212351.111977-4-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230313212351.111977-1-s.ivanov@proxmox.com> References: <20230313212351.111977-1-s.ivanov@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.143 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pmg-devel] [PATCH pmg-api 3/7] templates: add template for spamassassin's v342.pre X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2023 21:24:42 -0000 The file is taken from upstream, the only change is that we only enable the HashBL module if rbl_checks are enabled in pmg.conf Signed-off-by: Stoiko Ivanov --- src/Makefile | 1 + src/PMG/Config.pm | 3 +++ src/templates/v342.pre.in | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 src/templates/v342.pre.in diff --git a/src/Makefile b/src/Makefile index 49c7974..414b1ef 100644 --- a/src/Makefile +++ b/src/Makefile @@ -38,6 +38,7 @@ TEMPLATES = \ local.cf.in \ v310.pre.in \ v320.pre.in \ + v342.pre.in \ razor-agent.conf.in \ freshclam.conf.in \ clamd.conf.in \ diff --git a/src/PMG/Config.pm b/src/PMG/Config.pm index a0b1866..dce1513 100755 --- a/src/PMG/Config.pm +++ b/src/PMG/Config.pm @@ -1515,6 +1515,9 @@ sub rewrite_config_spam { $changes = 1 if $self->rewrite_config_file( 'v320.pre.in', '/etc/mail/spamassassin/v320.pre'); + $changes = 1 if $self->rewrite_config_file( + 'v342.pre.in', '/etc/mail/spamassassin/v342.pre'); + if ($use_razor) { mkdir "/root/.razor"; diff --git a/src/templates/v342.pre.in b/src/templates/v342.pre.in new file mode 100644 index 0000000..10dcaa1 --- /dev/null +++ b/src/templates/v342.pre.in @@ -0,0 +1,39 @@ +# 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.2, +# 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. +########################################################################### + +# HashBL - Query hashed/unhashed strings, emails, uris etc from DNS lists +# +[% IF pmg.spam.rbl_checks %] +loadplugin Mail::SpamAssassin::Plugin::HashBL +[% END %] + +# ResourceLimits - assure your spamd child processes +# do not exceed specified CPU or memory limit +# +# loadplugin Mail::SpamAssassin::Plugin::ResourceLimits + +# FromNameSpoof - help stop spam that tries to spoof other domains using +# the from name +# +# loadplugin Mail::SpamAssassin::Plugin::FromNameSpoof + +# Phishing - finds uris used in phishing campaigns detected by +# OpenPhish or PhishTank feeds. +# +# loadplugin Mail::SpamAssassin::Plugin::Phishing + -- 2.30.2