]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Handle DKIM permfail in Authentication-Results header 6028/head
authorVolodymyr Nekhayev <volodymyr.nekhayev@hostpapa.com>
Sat, 9 May 2026 03:58:29 +0000 (23:58 -0400)
committerVolodymyr Nekhayev <volodymyr.nekhayev@hostpapa.com>
Sat, 9 May 2026 03:58:29 +0000 (23:58 -0400)
When a DKIM signature has an invalid record, task:get_dkim_results() returns
'permfail' which should map to dkim=permerror in the Authentication-Results
header. Previously this result fell through to dkim=none, which is incorrect
when a DKIM signature is present.

Fixes #5957

lualib/lua_auth_results.lua

index 24bf39e64685878724b91729825be120ea859fcc..d03602f435eda64e2b3837dc2a60cb79d92d465f 100644 (file)
@@ -118,7 +118,7 @@ local function gen_auth_results(task, settings)
       ar_string = 'fail' -- imply failure, not neutral
     elseif dres.result == 'allow' then
       ar_string = 'pass'
-    elseif dres.result == 'bad record' or dres.result == 'permerror' then
+    elseif dres.result == 'bad record' or dres.result == 'permerror' or dres.result == 'permfail' then
       ar_string = 'permerror'
     elseif dres.result == 'tempfail' then
       ar_string = 'temperror'