mirror of
https://github.com/mailscope/kumomta.git
synced 2026-08-25 21:58:18 +00:00
6e15132be0
trying to figure out why they hang on GH actions
32 lines
670 B
Lua
32 lines
670 B
Lua
local kumo = require 'kumo'
|
|
-- This config acts as a sink that will discard all received mail
|
|
|
|
local TEST_DIR = os.getenv 'KUMOD_TEST_DIR'
|
|
|
|
kumo.on('init', function()
|
|
kumo.start_esmtp_listener {
|
|
listen = '127.0.0.1:0',
|
|
relay_hosts = { '0.0.0.0/0' },
|
|
}
|
|
|
|
kumo.configure_local_logs {
|
|
log_dir = TEST_DIR .. '/logs',
|
|
max_segement_duration = '1s',
|
|
}
|
|
|
|
kumo.define_spool {
|
|
name = 'data',
|
|
path = TEST_DIR .. '/data-spool',
|
|
}
|
|
|
|
kumo.define_spool {
|
|
name = 'meta',
|
|
path = TEST_DIR .. '/meta-spool',
|
|
}
|
|
end)
|
|
|
|
kumo.on('smtp_server_message_received', function(msg)
|
|
-- Accept and discard all messages
|
|
msg:set_meta('queue', 'null')
|
|
end)
|