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 5200292255 for ; Mon, 13 Mar 2023 22:24:16 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3A89318CC5 for ; Mon, 13 Mar 2023 22:24:16 +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:12 +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 B7662458C2 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:49 +0100 Message-Id: <20230313212351.111977-7-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 -1.408 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% ENA_SUBJ_ODD_CASE 2.6 Subject has odd case KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years 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 6/7] templates: enable DecodeShortUrls for SpamAssassin 4.0.0 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:16 -0000 enabled if they system has rbl_checks enabled. The module resolves url-shortener (e.g. bit.ly) chains. the KAM rulset has a number of url-shorteners configured (KAM_urlshorteners.cf). While the functionality also works without the configured caching module, it worked well in my tests. Signed-off-by: Stoiko Ivanov --- src/templates/v400.pre.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/templates/v400.pre.in b/src/templates/v400.pre.in index 4d68d6c..233493d 100644 --- a/src/templates/v400.pre.in +++ b/src/templates/v400.pre.in @@ -48,12 +48,17 @@ endif [% END %] + +[% IF pmg.spam.rbl_checks %] # DecodeShortUrl - Check for shortened URLs # # Note that this plugin will send HTTP requests to different URL shortener # services. Enabling caching is recommended, see plugin documentation. # -# loadplugin Mail::SpamAssassin::Plugin::DecodeShortURLs +loadplugin Mail::SpamAssassin::Plugin::DecodeShortURLs +url_shortener_cache_type dbi +url_shortener_cache_dsn dbi:SQLite:dbname=/var/lib/pmg/decode_short_urls.db +[% END %] # DMARC - Check DMARC compliance # -- 2.30.2