summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-27 09:57:37 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-27 09:57:37 +0100
commitcbd0e6ffdb8082dbf8e81d9c48a3c86ef5c6055b (patch)
treefb0bc7357e867b047170398e0dc456c14060c06f /src
parentbc371c1834daca617349dff48f3240ce3175238d (diff)
downloadrspamd-cbd0e6ffdb8082dbf8e81d9c48a3c86ef5c6055b.tar.gz
rspamd-cbd0e6ffdb8082dbf8e81d9c48a3c86ef5c6055b.zip
[Minor] Push dkim domain to verify callback
Diffstat (limited to 'src')
-rw-r--r--src/plugins/dkim_check.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c
index 475b40c7e..a1db0e5f4 100644
--- a/src/plugins/dkim_check.c
+++ b/src/plugins/dkim_check.c
@@ -1369,7 +1369,14 @@ dkim_module_lua_push_verify_result (struct rspamd_dkim_lua_verify_cbdata *cbd,
lua_pushboolean (cbd->L, success);
lua_pushstring (cbd->L, error_str);
- if (lua_pcall (cbd->L, 3, 0, 0) != 0) {
+ if (cbd->ctx) {
+ lua_pushstring (cbd->L, rspamd_dkim_get_domain (cbd->ctx));
+ }
+ else {
+ lua_pushnil (cbd->L);
+ }
+
+ if (lua_pcall (cbd->L, 4, 0, 0) != 0) {
msg_err_task ("call to verify callback failed: %s",
lua_tostring (cbd->L, -1));
lua_pop (cbd->L, 1);