mail/rspamd: fix DMARC report on NetBSD Fix DMARC report on NetBSD. os.date() require integer as second argument but get_date() returns float on NetBSD. So, convert return value of get_date() to integer. Without this change, data required for DMARC report would not be stored to Redis. This fix is provided from Yoshitaka Tokugawa <toku at tokugawa.org>. Bump PKGREVISION.diff -r1.104 -r1.105 pkgsrc/mail/rspamd/Makefile
(taca)
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.104 2024/04/25 15:19:22 taca Exp $ | 1 | # $NetBSD: Makefile,v 1.105 2024/05/16 15:22:13 taca Exp $ | |
2 | 2 | |||
3 | DISTNAME= rspamd-3.8.4 | 3 | DISTNAME= rspamd-3.8.4 | |
4 | PKGREVISION= 1 | 4 | PKGREVISION= 2 | |
5 | CATEGORIES= mail | 5 | CATEGORIES= mail | |
6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=rspamd/} | 6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=rspamd/} | |
7 | 7 | |||
8 | MAINTAINER= bartosz.kuzma@gmail.com | 8 | MAINTAINER= bartosz.kuzma@gmail.com | |
9 | HOMEPAGE= https://www.rspamd.com/ | 9 | HOMEPAGE= https://www.rspamd.com/ | |
10 | COMMENT= Fast, free and open-source spam filtering system | 10 | COMMENT= Fast, free and open-source spam filtering system | |
11 | LICENSE= 2-clause-bsd | 11 | LICENSE= 2-clause-bsd | |
12 | 12 | |||
13 | DEPENDS+= ${LUA_PKGPREFIX}-lpeg-[0-9]*:../../devel/lua-lpeg | 13 | DEPENDS+= ${LUA_PKGPREFIX}-lpeg-[0-9]*:../../devel/lua-lpeg | |
14 | DEPENDS+= ragel-[0-9]*:../../devel/ragel | 14 | DEPENDS+= ragel-[0-9]*:../../devel/ragel | |
15 | 15 | |||
16 | USE_TOOLS+= perl pkg-config | 16 | USE_TOOLS+= perl pkg-config | |
17 | USE_LANGUAGES= c c++ | 17 | USE_LANGUAGES= c c++ |
@@ -1,4 +1,3 @@ | @@ -1,4 +1,3 @@ | |||
1 | # $NetBSD: cfgfiles.mk,v 1.9 2024/01/21 20:22:57 wiz Exp $ | 1 | # $NetBSD: cfgfiles.mk,v 1.10 2024/05/16 15:22:13 taca Exp $ | |
2 | # Do not edit, regenerate using 'make cfgfiles' | 2 | # Do not edit, regenerate using 'make cfgfiles' | |
3 | CFGFILES= actions.conf cgp.inc common.conf composites.conf groups.conf lang_detection.inc logging.inc maps.d/dmarc_whitelist.inc maps.d/maillist.inc maps.d/mid.inc maps.d/mime_types.inc maps.d/redirectors.inc maps.d/spf_dkim_whitelist.inc maps.d/surbl-whitelist.inc metrics.conf modules.conf modules.d/antivirus.conf modules.d/arc.conf modules.d/asn.conf modules.d/aws_s3.conf modules.d/bimi.conf modules.d/chartable.conf modules.d/clickhouse.conf modules.d/dcc.conf modules.d/dkim.conf modules.d/dkim_signing.conf modules.d/dmarc.conf modules.d/elastic.conf modules.d/emails.conf modules.d/external_relay.conf modules.d/external_services.conf modules.d/force_actions.conf modules.d/forged_recipients.conf modules.d/fuzzy_check.conf modules.d/greylist.conf modules.d/hfilter.conf modules.d/history_redis.conf modules.d/http_headers.conf modules.d/known_senders.conf modules.d/maillist.conf modules.d/metadata_exporter.conf modules.d/metric_exporter.conf modules.d/mid.conf modules.d/milter_headers.conf modules.d/mime_types.conf modules.d/multimap.conf modules.d/mx_check.conf modules.d/neural.conf modules.d/once_received.conf modules.d/p0f.conf modules.d/phishing.conf modules.d/ratelimit.conf modules.d/rbl.conf modules.d/redis.conf modules.d/regexp.conf modules.d/replies.conf modules.d/reputation.conf modules.d/rspamd_update.conf modules.d/spamassassin.conf modules.d/spamtrap.conf modules.d/spf.conf modules.d/surbl.conf modules.d/trie.conf modules.d/url_redirector.conf modules.d/whitelist.conf options.inc rspamd.conf scores.d/content_group.conf scores.d/fuzzy_group.conf scores.d/headers_group.conf scores.d/hfilter_group.conf scores.d/mime_types_group.conf scores.d/mua_group.conf scores.d/phishing_group.conf scores.d/policies_group.conf scores.d/rbl_group.conf scores.d/statistics_group.conf scores.d/subject_group.conf scores.d/surbl_group.conf scores.d/whitelist_group.conf settings.conf statistic.conf worker-controller.inc worker-fuzzy.inc worker-normal.inc worker-proxy.inc | 3 | CFGFILES= actions.conf cgp.inc common.conf composites.conf groups.conf lang_detection.inc logging.inc maps.d/dmarc_whitelist.inc maps.d/maillist.inc maps.d/mid.inc maps.d/mime_types.inc maps.d/redirectors.inc maps.d/spf_dkim_whitelist.inc maps.d/surbl-whitelist.inc metrics.conf modules.conf modules.d/antivirus.conf modules.d/arc.conf modules.d/asn.conf modules.d/aws_s3.conf modules.d/bimi.conf modules.d/chartable.conf modules.d/clickhouse.conf modules.d/dcc.conf modules.d/dkim.conf modules.d/dkim_signing.conf modules.d/dmarc.conf modules.d/elastic.conf modules.d/emails.conf modules.d/external_relay.conf modules.d/external_services.conf modules.d/force_actions.conf modules.d/forged_recipients.conf modules.d/fuzzy_check.conf modules.d/greylist.conf modules.d/hfilter.conf modules.d/history_redis.conf modules.d/http_headers.conf modules.d/known_senders.conf modules.d/maillist.conf modules.d/metadata_exporter.conf modules.d/metric_exporter.conf modules.d/mid.conf modules.d/milter_headers.conf modules.d/mime_types.conf modules.d/multimap.conf modules.d/mx_check.conf modules.d/neural.conf modules.d/once_received.conf modules.d/p0f.conf modules.d/phishing.conf modules.d/ratelimit.conf modules.d/rbl.conf modules.d/redis.conf modules.d/regexp.conf modules.d/replies.conf modules.d/reputation.conf modules.d/rspamd_update.conf modules.d/spamassassin.conf modules.d/spamtrap.conf modules.d/spf.conf modules.d/surbl.conf modules.d/trie.conf modules.d/url_redirector.conf modules.d/whitelist.conf options.inc rspamd.conf scores.d/content_group.conf scores.d/fuzzy_group.conf scores.d/headers_group.conf scores.d/hfilter_group.conf scores.d/mime_types_group.conf scores.d/mua_group.conf scores.d/phishing_group.conf scores.d/policies_group.conf scores.d/rbl_group.conf scores.d/statistics_group.conf scores.d/subject_group.conf scores.d/surbl_group.conf scores.d/whitelist_group.conf settings.conf statistic.conf worker-controller.inc worker-fuzzy.inc worker-normal.inc worker-proxy.inc | |
4 |
@@ -1,13 +1,14 @@ | @@ -1,13 +1,14 @@ | |||
1 | $NetBSD: distinfo,v 1.57 2024/03/03 11:36:53 wiz Exp $ | 1 | $NetBSD: distinfo,v 1.58 2024/05/16 15:22:13 taca Exp $ | |
2 | 2 | |||
3 | BLAKE2s (rspamd-3.8.4.tar.gz) = 00fd3204252f90d9c3293410f3d4026bcd049e84552ce610828ecc3a0c9b9e81 | 3 | BLAKE2s (rspamd-3.8.4.tar.gz) = 00fd3204252f90d9c3293410f3d4026bcd049e84552ce610828ecc3a0c9b9e81 | |
4 | SHA512 (rspamd-3.8.4.tar.gz) = dda099dd9a17699d143fc8018b89fbecfa9659eccc26b5fb88bc3f40c47e935993dfc81f1f93bb69880d17af40870e6ea20edbeed7e3f4c12c278f5c12b56a51 | 4 | SHA512 (rspamd-3.8.4.tar.gz) = dda099dd9a17699d143fc8018b89fbecfa9659eccc26b5fb88bc3f40c47e935993dfc81f1f93bb69880d17af40870e6ea20edbeed7e3f4c12c278f5c12b56a51 | |
5 | Size (rspamd-3.8.4.tar.gz) = 5915680 bytes | 5 | Size (rspamd-3.8.4.tar.gz) = 5915680 bytes | |
6 | SHA1 (patch-CMakeLists.txt) = 1c91cf53edeb12e1a469cd02421e1eaee5061ab7 | 6 | SHA1 (patch-CMakeLists.txt) = 1c91cf53edeb12e1a469cd02421e1eaee5061ab7 | |
7 | SHA1 (patch-cmake_Toolset.cmake) = fbc4027fedb4261ce913701ebbb32d8395bc7783 | 7 | SHA1 (patch-cmake_Toolset.cmake) = fbc4027fedb4261ce913701ebbb32d8395bc7783 | |
8 | SHA1 (patch-contrib_doctest_doctest_doctest.h) = 5238cb9f837e1d8f402023ddc2f7d02dda3f67ab | 8 | SHA1 (patch-contrib_doctest_doctest_doctest.h) = 5238cb9f837e1d8f402023ddc2f7d02dda3f67ab | |
9 | SHA1 (patch-contrib_fpconv_fpconv.c) = b1ec2b07570674458e69020ccbf25f0374d894f6 | 9 | SHA1 (patch-contrib_fpconv_fpconv.c) = b1ec2b07570674458e69020ccbf25f0374d894f6 | |
10 | SHA1 (patch-src_libserver_cfg__utils.cxx) = 7122f06adeaaa9a362606ef38147b7e39f66393c | 10 | SHA1 (patch-src_libserver_cfg__utils.cxx) = 7122f06adeaaa9a362606ef38147b7e39f66393c | |
11 | SHA1 (patch-src_libserver_symcache_symcache__impl.cxx) = 8a5c69ab343409427619a9cbc0dc080d548b9c53 | 11 | SHA1 (patch-src_libserver_symcache_symcache__impl.cxx) = 8a5c69ab343409427619a9cbc0dc080d548b9c53 | |
12 | SHA1 (patch-src_libstat_backends_redis__backend.cxx) = 4c60287a574066a841c76081cd88512a57f0b27f | 12 | SHA1 (patch-src_libstat_backends_redis__backend.cxx) = 4c60287a574066a841c76081cd88512a57f0b27f | |
13 | SHA1 (patch-src_plugins_lua_dmarc.lua) = 61b36989b16ad8fea25bafcfd96cd83f57a44bd3 | |||
13 | SHA1 (patch-src_rspamd.c) = 1903994d5970af57de9c5d522df3dd12576c8418 | 14 | SHA1 (patch-src_rspamd.c) = 1903994d5970af57de9c5d522df3dd12576c8418 |
$NetBSD: patch-src_plugins_lua_dmarc.lua,v 1.1 2024/05/16 15:22:14 taca Exp $
os.date() require integer as second argument but get_date() returns
float on NetBSD. So, convert return value of get_date() to integer.
This fix is provided from Yoshitaka Tokugawa <toku at tokugawa.org>.
--- src/plugins/lua/dmarc.lua.orig 2024-02-26 09:36:56.000000000 +0000
+++ src/plugins/lua/dmarc.lua
@@ -310,7 +310,7 @@ local function dmarc_validate_policy(tas
-- Prepare and send redis report element
local period = os.date('%Y%m%d',
- task:get_date({ format = 'connect', gmt = false }))
+ math.floor(task:get_date({ format = 'connect', gmt = false })))
-- Dmarc domain key must include dmarc domain, rua and period
local dmarc_domain_key = table.concat(