Wez Furlong d6203f6eff Allow logging via a lua hook
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)
```
2023-05-04 16:20:29 -07:00
2023-03-06 07:53:27 -07:00
2023-04-18 16:27:22 -07:00
2023-05-04 16:20:29 -07:00
2023-03-29 07:02:46 -07:00
2023-03-29 09:23:45 -07:00
2023-02-10 16:44:10 -07:00
2023-03-30 14:01:46 -07:00
2023-02-21 21:18:49 -07:00
2023-02-21 21:18:49 -07:00
2023-03-28 16:47:50 -07:00
2023-03-09 20:56:02 -07:00
2023-03-31 14:39:03 -04:00
2023-02-15 06:51:59 -07:00

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

S
Description
The first Open-Source high-performance MTA developed from the ground-up for high-volume email sending environments.
Readme
37 MiB
Languages
Rust 91.8%
Lua 6.3%
Python 0.9%
Shell 0.8%
JavaScript 0.1%