aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_spf.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-07-30 16:08:15 +0600
committerGitHub <noreply@github.com>2024-07-30 16:08:15 +0600
commite4e393aa663268fad7b1634e48524c0d800bdac9 (patch)
tree212d1f37bbfb45bc86d19ead98f73571e541cfa7 /src/lua/lua_spf.c
parent7fc185c25b87e5059a15640cc2b23d829bf1871f (diff)
parent9395e3c03727a0a5902dccb49f49788bff9027d9 (diff)
downloadrspamd-vstakhov-fuzzy-tcp.tar.gz
rspamd-vstakhov-fuzzy-tcp.zip
Merge branch 'master' into vstakhov-fuzzy-tcpvstakhov-fuzzy-tcp
Diffstat (limited to 'src/lua/lua_spf.c')
-rw-r--r--src/lua/lua_spf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lua/lua_spf.c b/src/lua/lua_spf.c
index 46e72202f..850ce2120 100644
--- a/src/lua/lua_spf.c
+++ b/src/lua/lua_spf.c
@@ -89,6 +89,8 @@ lua_load_spf(lua_State *L)
lua_setfield(L, -2, "perm_fail");
lua_pushinteger(L, RSPAMD_SPF_FLAG_CACHED);
lua_setfield(L, -2, "cached");
+ lua_pushinteger(L, RSPAMD_SPF_RESOLVED_PLUSALL);
+ lua_setfield(L, -2, "plusall");
lua_setfield(L, -2, "flags");
@@ -368,6 +370,11 @@ spf_check_element(lua_State *L, struct spf_resolved *rec, struct spf_addr *addr,
lua_pushinteger(L, RSPAMD_SPF_RESOLVED_TEMP_FAILED);
lua_pushfstring(L, "%cany", spf_mech_char(addr->mech));
}
+ else if (rec->flags & RSPAMD_SPF_RESOLVED_PLUSALL) {
+ lua_pushboolean(L, false);
+ lua_pushinteger(L, RSPAMD_SPF_RESOLVED_PLUSALL);
+ lua_pushfstring(L, "%cany", spf_mech_char(addr->mech));
+ }
else {
lua_pushboolean(L, true);
lua_pushinteger(L, addr->mech);