Skip to main content

Name

core_inbound_smtp_tls_post_accept — This hook is invoked after the tls handshake during the ESMTP conversation.

Synopsis

local core = require("msys.core");
local mod = {};

function mod:core_inbound_smtp_tls_post_accept(mc, event, eventtype, vclosure, now)
  mc.ctx.code = 420;
  mc.ctx.disconnect = 1;
  mc.ctx:set(core.VCTX_CONN, '_tls_note', '421 4.7.0 TLS Negotiation failed.');
end

Description

This hook is only valid for Momentum 4.4.0 or higher. It is invoked after the tls handshake. It allows the user to augment the built-in TLS accept handshake for inbound SMTP sessions. If mc.ctx.code is set to anything other than 220, and mc.ctx.disconnect is set to 1, the message will be rejected and the SMTP connection will terminate. You may set a rejection message with mc.ctx:set(core.VCTX_CONN, '_tls_note', _message_'); Default rejection message is 421 4.7.0 TLS Negotiation failed.

Parameters

mc

message_construct

event

Event

eventtype

eventtype

vclosure

vclosure

now

now

Return Values

This hook returns void.

Was this page helpful?