[pmg-devel] [PATCH pmg-api 6/7] templates: enable DecodeShortUrls for SpamAssassin 4.0.0

Stoiko Ivanov s.ivanov at proxmox.com
Mon Mar 13 22:23:49 CET 2023


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 <s.ivanov at proxmox.com>
---
 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





More information about the pmg-devel mailing list