Browse Source

[Minor] Add selector to get rspamd_hostname

pull/4926/head
Lucas Rolff 2 weeks ago
parent
commit
458e980062
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      lualib/lua_selectors/extractors.lua

+ 7
- 0
lualib/lua_selectors/extractors.lua View File

@@ -17,6 +17,7 @@ limitations under the License.
local fun = require 'fun'
local meta_functions = require "lua_meta"
local lua_util = require "lua_util"
local rspamd_util = require "rspamd_util"
local rspamd_url = require "rspamd_url"
local common = require "lua_selectors/common"
local ts = require("tableshape").types
@@ -560,6 +561,12 @@ The first argument must be header name.]],
end,
['description'] = 'Get metatokens for a message as strings',
},
['rspamd_hostname'] = {
['get_value'] = function(task)
return rspamd_util.get_hostname(), 'string'
end,
['description'] = 'Get hostname of the filter server',
},
}

return extractors

Loading…
Cancel
Save