mirror of
https://github.com/mailscope/kumomta.git
synced 2026-10-28 17:26:14 +00:00
"null" is a special queue name: assigning messages to null causes them to not be stored to spool and silently discarded.
34 lines
887 B
Lua
34 lines
887 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',
|
|
}
|
|
|
|
-- 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)
|