vctx:tarpit

March 26, 2020 Contributors

Name

vctx:tarpit — Issue a time cost on the inbound session

Synopsis

vctx:tarpit(interval);

interval: number

Description

This instructs Momentum that the SMTP session should be put on hold for the specified number of seconds. Currently only the SMTP listener supports this.

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

local mod = {};
function mod:validate_connect(accept, vctx)
  vctx:tarpit(1);
  return msys.core.VALIDATE_CONT;
end

msys.registerModule("validate_connect", mod);

Enable this function with the statement require('msys.extended.vctx');.