Skip to main content

msys.cloudmark.add_af_data

Last updated March 2020

Name

msys.cloudmark.add_af_data — Pass data for use with the Cloudmark ActiveFilter.

Synopsis

require('msys.cloudmark')

msys.cloudmark.add_af_data(addr, data)

addr: string
data: userdata (key-value pairs)

Description

Optionally pass the Cloudmark ActiveFilter an email address and a table of key-value pairs.

Note

You must load and correctly configure the cloudmark module and the maildir module before using this function. This function does not have a return value.

require("msys");
require("msys.extended.vctx");
require("msys.cloudmark");

local mod = {};
function mod:validate_rcptto(msg, rcptto_string, ac, vctx)
  local localpart = vctx:get(msys.core.VCTX_MESS, "rcptto_localpart");
  local domain = vctx:get(msys.core.VCTX_MESS, "rcptto_domain");
  msys.cloudmark.add_af_data(localpart .. "@" .. domain,
                             { custom_key = "custom_value" });
  return msys.core.VALIDATE_CONT;
end
msys.registerModule("af_test", mod);

See Also

Was this page helpful?