mirror of
https://github.com/mailscope/kumomta.git
synced 2026-09-09 20:12:13 +00:00
825 B
825 B
kumo.on('smtp_server_ehlo', function(domain, conn_meta))
Called by the ESMTP server in response to the client issuing either a "HELO"
or "EHLO" command. The event handler is passed the domain parameter from
the HELO/EHLO command.
{{since('dev', indent=True)}} The conn_meta parameter represents the connection metadata and can be used to share state between the various SMTP listener event handlers. See Connection Metadata for more information.
You may choose to reject the connection via kumo.reject.
-- Called to validate the helo and/or ehlo domain
kumo.on('smtp_server_ehlo', function(domain)
-- Use kumo.reject to return an error to the EHLO command
if domain == 'bad.actor' then
kumo.reject(420, 'go away')
end
end)