Hello all,
I would like to log all requests to the RBL as sometimes I receive a “server fail” message. I want to investigate what is happening.
I have added the following script to the end of the file /opt/mailcow-dockerized/data/conf/rspamd/lua/rspamd.local.lua
local rspamd_logger = require "rspamd_logger"
local function process_dns_log(task)
--Retrieve the name and type of DNS request from Rspamd's log
local dns_name = task:get_mempool():get_variable("dns_name")
local dns_type = task:get_mempool():get_variable("dns_type")
--Log information about the DNS request
local log_message = string.format("DNS Request - Name: %s, Type: %s", dns_name, dns_type)
rspamd_logger.infox(log_message)
end
rspamd_config:register_symbol({
name = 'DNS_LOG',
callback = process_dns_log,
})
I have added the following symbol to the file /opt/mailcow-dockerized/data/conf/rspamd/local.d/rbl_group.conf
DNS_LOG = {
score = 0.1;
description = 'Log DNS requests';
}
The system doesn’t seem to be working; can anyone help me?
Thank you!