mirror of
https://github.com/mailscope/kumomta.git
synced 2026-08-25 05:38:18 +00:00
054501e535
A callback is used to resolve the config at the time that we set up the destination site structure (eg: when we get the first ready-to-send message for it, and again after it has idled out). This is used in the example configs to enable "OpportunisticInsecure" TLS mode so that we can successfully delivery over TLS to the default self-signed TLS certs on the sink.
35 lines
940 B
Lua
35 lines
940 B
Lua
local kumo = require 'kumo'
|
|
|
|
-- This config acts as a sink that will discard all received mail
|
|
|
|
kumo.on('init', function()
|
|
-- Define a listener.
|
|
-- Can be used multiple times with different parameters to
|
|
-- define multiple listeners!
|
|
kumo.start_esmtp_listener {
|
|
listen = '127.0.0.1:2026',
|
|
relay_hosts = { '127.0.0.1', '192.168.1.0/24' },
|
|
}
|
|
|
|
-- Define the default "data" spool location.
|
|
-- This is unused by this config, but we are required to
|
|
-- define a default spool location.
|
|
kumo.define_spool {
|
|
name = 'data',
|
|
path = '/tmp/kumo-sink/data',
|
|
}
|
|
|
|
-- Define the default "meta" spool location.
|
|
-- This is unused by this config, but we are required to
|
|
-- define a default spool location.
|
|
kumo.define_spool {
|
|
name = 'meta',
|
|
path = '/tmp/kumo-sink/meta',
|
|
}
|
|
end)
|
|
|
|
kumo.on('smtp_server_message_received', function(msg)
|
|
-- Accept and discard all messages
|
|
msg:set_meta('queue', 'null')
|
|
end)
|