kumo.start_esmtp_listener {PARAMS}
Configure and start ESMTP service.
This function should be called only from inside your init event handler.
To listen on multiple IP/port combinations, simply call
kump.start_esmtp_listener
multiple times with the appropriate parameters.
kumo.on('init', function()
-- use the same settings for ports 25 and 2026, without repeating them all
for _, port in ipairs { 25, 2026 } do
kumo.start_esmtp_listener {
listen = '0:' .. tostring(port),
relay_hosts = { '0.0.0.0/0' },
}
end
end)
Note
You can also use the
smtp_server_get_dynamic_parameters
event to dynamically adjust listener parameters. You cannot bind
new ports or IPs that way, but if you are using the "any" address
such as 0.0.0.0
or ::
, you can dynamically refine the parameters
for IP-based virtual service.
PARAMS
is a lua table that can accept the keys listed below:
- banner
- client_timeout
- data_buffer_size
- data_processing_timeout
- deferred_queue
- deferred_spool
- hostname
- invalid_line_endings
- line_length_hard_limit
- listen
- max_connections
- max_message_size
- max_messages_per_connection
- max_recipients_per_message
- meta
- peer
- relay_hosts
- tls_certificate
- tls_private_key
- trace_headers
- via