mirror of
https://github.com/mailscope/kumomta.git
synced 2026-10-28 09:16:15 +00:00
d6203f6eff57a11a98afeece6ba39e5152edb41f
Still need to write up some proper docs, but the gist is that
the example below will enqueue a message holding the content
of the JsonRecord for each log event, and that message will be
dispatched via a custom lua delivery mechanism.
```lua
kumo.on('init', function()
kumo.configure_log_hook {}
end)
kumo.on('make.lua-sender', function(domain, tenant, campaign)
print 'making lua sender'
local sender = {}
function sender:send(message)
print('Sending a message!', message:get_data())
return 'Super!'
end
return sender
end)
kumo.on('should_enqueue_log_record', function(msg)
local log_record = msg:get_meta 'log_record'
print('should_enqueue_log_record', log_record)
-- avoid an infinite loop caused by logging that we logged
if log_record.queue ~= 'lua-stuff' then
msg:set_meta('queue', 'lua-stuff')
return true
end
return false
end)
kumo.on('get_queue_config', function(domain, tenant, campaign)
print('get_queue_config', domain, tenant, campaign)
if domain == 'lua-stuff' then
return kumo.make_queue_config {
protocol = {
custom_lua = {
constructor = 'make.lua-sender',
},
},
}
end
return kumo.make_queue_config {}
end)
```
KumoMTA
This repository holds the source code to KumoMTA, a modern Message Transfer Agent designed for large scale sending environments.
You can learn more about why it exists here.
Documentation
You can learn more about KumoMTA from the Documentation
Community
Real-time discussion is available on Our Discord.
Our Forum is better for long-form questions and discussions.
Developers
If you're interesting in contributing/extending KumoMTA, take a look at DEVELOPERS.md.
Getting Help
Please see How to Report Bugs or Get Help
Description
The first Open-Source high-performance MTA developed from the ground-up for high-volume email sending environments.
37 MiB
Languages
Rust
91.8%
Lua
6.3%
Python
0.9%
Shell
0.8%
JavaScript
0.1%