Module lua_maps

This module contains helper functions for managing rspamd maps

Brief content:

Functions:

lua_maps.map_add_from_ucl(opt, mtype, description): Creates a map from static data.

lua_maps.map_add(mname, optname, mtype, description): Creates a map from configuration elements (static data or URL).

Functions

The module lua_maps defines the following functions.

Function lua_maps.map_add_from_ucl(opt, mtype, description)

Creates a map from static data Returns true if map was added or nil

Parameters:

  • opt {string or table}: data for map (or URL)
  • mtype {string}: type of map (set, map, radix, regexp)
  • description {string}: human-readable description of map

Returns:

  • {bool}: true on success, or nil

Back to module description.

Function lua_maps.map_add(mname, optname, mtype, description)

Creates a map from configuration elements (static data or URL) Returns true if map was added or nil

Parameters:

  • mname {string}: config section to use
  • optname {string}: option name to use
  • mtype {string}: type of map (‘set’, ‘hash’, ‘radix’, ‘regexp’)
  • description {string}: human-readable description of map

Returns:

  • {bool}: true on success, or nil

Back to module description.

Back to top.