bad_host = "dynamic";
symbol_strict = "ONCE_RECEIVED_STRICT";
symbol = "ONCE_RECEIVED";
+ symbol_mx = "DIRECT_TO_MX";
.include(try=true,priority=5) "${DBDIR}/dynamic/once_received.conf"
.include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/once_received.conf"
local symbol = 'ONCE_RECEIVED'
local symbol_rdns = 'RDNS_NONE'
+local symbol_mx = 'DIRECT_TO_MX'
-- Symbol for strict checks
local symbol_strict = nil
local bad_hosts = {}
if recvh and #recvh <= 1 then
task:insert_result(symbol, 1)
task:insert_result(symbol_strict, 1)
+ -- Check for MUAs
+ local ua = task:get_header('User-Agent')
+ local xm = task:get_header('X-Mailer')
+ if (ua or xm) then
+ task:insert_result(symbol_mx, 1, (ua or xm))
+ end
end
task:insert_result(symbol_rdns, 1)
else
elseif n == 'whitelist' then
whitelist = rspamd_map_add('once_received', 'whitelist', 'radix',
'once received whitelist')
+ elseif n == 'symbol_mx' then
+ symbol_mx = v
end
end
type = 'virtual',
parent = id
})
+ rspamd_config:register_symbol({
+ name = symbol_mx,
+ type = 'virtual',
+ parent = id
+ })
end
end