msys.expandMacro
Last updated March 2020
Name
msys.expandMacro — Expand macros (such as sieve, spf and custom_logger macros)
Synopsis
msys.expandMacro();
Description
Expands macros (such as sieve, spf and custom_logger macros) present in the supplied input string and returns the expanded result.
require("msys.core")
local mod = {};
function mod:validate_ehlo(str, accept, vctx)
print("ehlo string is:", msys.expandMacro("%{vctx_conn:ehlo_string}"));
return msys.core.VALIDATE_CONT;
end
msys.registerModule("ehlo_phase", mod);
The parameter passed to msys.expandMacro
expands the built-in validation context variable, ehlo_string
. For a list of these variables see “Connection Context Variables”. Note: Not all variables are available in all callouts.
Because this function is in the msys
namespace, an explicit require
is not necessary.
Was this page helpful?