summaryrefslogtreecommitdiffstats
path: root/test/functional/lua/external_relay.lua
blob: 6aa3a292c56e903c3bf1b9ca2416a6fb48c3c3b2 (plain)
1
2
3
4
5
6
7
8
9
10
rspamd_config:register_symbol({
  name = 'EXTERNAL_RELAY_TEST',
  score = 0.0,
  callback = function(task)
    local from_ip = string.format('IP=%s', task:get_from_ip() or 'NIL')
    local hostname = string.format('HOSTNAME=%s', task:get_hostname() or 'NIL')
    local helo = string.format('HELO=%s', task:get_helo() or 'NIL')
    return true, from_ip, hostname, helo
  end
})