{
ucl_object_t *top = NULL;
GString *dkim_sig;
- const ucl_object_t *rmilter_reply;
+ const ucl_object_t *milter_reply;
struct rspamd_saved_protocol_reply *cached;
static const gchar *varname = RSPAMD_MEMPOOL_CACHED_REPLY;
}
if (flags & RSPAMD_PROTOCOL_RMILTER) {
- rmilter_reply = rspamd_mempool_get_variable (task->task_pool,
- RSPAMD_MEMPOOL_RMILTER_REPLY);
+ milter_reply = rspamd_mempool_get_variable (task->task_pool,
+ RSPAMD_MEMPOOL_MILTER_REPLY);
- if (rmilter_reply) {
+ if (milter_reply) {
if (task->cmd == CMD_CHECK_V2) {
- ucl_object_insert_key (top, ucl_object_ref (rmilter_reply),
+ ucl_object_insert_key (top, ucl_object_ref (milter_reply),
"milter", 0, false);
}
else {
- ucl_object_insert_key (top, ucl_object_ref (rmilter_reply),
+ ucl_object_insert_key (top, ucl_object_ref (milter_reply),
"rmilter", 0, false);
}
}
LUA_FUNCTION_DEF (task, get_settings_id);
/***
- * @method task:set_rmilter_reply(obj)
- * Set special reply for rmilter
+ * @method task:set_milter_reply(obj)
+ * Set special reply for milter
* @param {any} obj any lua object that corresponds to the settings format
* @example
-task:set_rmilter_reply({
+task:set_milter_reply({
add_headers = {['X-Lua'] = 'test'},
-- 1 is the position of header to remove
remove_headers = {['DKIM-Signature'] = 1},
})
*/
-LUA_FUNCTION_DEF (task, set_rmilter_reply);
+LUA_FUNCTION_DEF (task, set_milter_reply);
/***
* @method task:process_re(params)
* - `metrics`: metrics and symbols
* - `messages`: messages
* - `dkim`: dkim signature
- * - `rmilter`: rmilter control block
+ * - `milter`: milter control block
* - `extra`: extra data, such as profiling
* - `urls`: list of all urls in a message
*
LUA_INTERFACE_DEF (task, set_flag),
LUA_INTERFACE_DEF (task, get_flags),
LUA_INTERFACE_DEF (task, has_flag),
- LUA_INTERFACE_DEF (task, set_rmilter_reply),
+ {"set_rmilter_reply", lua_task_set_milter_reply},
+ LUA_INTERFACE_DEF (task, set_milter_reply),
LUA_INTERFACE_DEF (task, get_digest),
LUA_INTERFACE_DEF (task, store_in_file),
LUA_INTERFACE_DEF (task, get_protocol_reply),
}
static gint
-lua_task_set_rmilter_reply (lua_State *L)
+lua_task_set_milter_reply (lua_State *L)
{
struct rspamd_task *task = lua_check_task (L, 1);
ucl_object_t *reply, *prev;
if (reply != NULL && task != NULL) {
prev = rspamd_mempool_get_variable (task->task_pool,
- RSPAMD_MEMPOOL_RMILTER_REPLY);
+ RSPAMD_MEMPOOL_MILTER_REPLY);
if (prev) {
ucl_object_merge (prev, reply, false);
}
else {
rspamd_mempool_set_variable (task->task_pool,
- RSPAMD_MEMPOOL_RMILTER_REPLY,
+ RSPAMD_MEMPOOL_MILTER_REPLY,
reply, (rspamd_mempool_destruct_t) ucl_object_unref);
}
}