mirror of
https://github.com/mailscope/kumomta.git
synced 2026-09-06 18:48:57 +00:00
250db18fae7ecfebb33e0f0695b2d430cbc4606a
If init fails, we log an error message immediately, then proceed
to shut down the server, which then prints a succint "Error:
Initialization raised an error" message.
It can be easy to overlook the error context and conclude that
there is none.
This commit will now re-display the error message at the bottom,
so that it is printed out twice.
For example:
```
./target/debug/kumod --policy /tmp/bad.lua
2023-08-31T17:20:46.569685Z INFO localset-0 kumo_server_common::http_server: http listener on 0.0.0.0:8000
2023-08-31T17:20:46.570330Z INFO localset-0 kumo_server_common::http_server: https listener on 0.0.0.0:8001
2023-08-31T17:20:46.570761Z INFO localset-0 kumod::smtp_server: smtp listener on 0.0.0.0:2025
2023-08-31T17:20:46.621327Z ERROR localset-0 kumo_server_common::start: problem initializing: callback error
stack traceback:
[C]: in function 'kumo.on'
[string "/tmp/bad.lua"]:86: in function <[string "/tmp/bad.lua"]:6>
caused by: Attempting to register an event handler via `kumo.on('get_listener_domain', ...)` from within the event handler 'init'. You must move your event handler registration so that it is setup directly when the policy is loaded in order for it to consistently trigger and handle events.
2023-08-31T17:20:46.621437Z INFO localset-0 kumo_server_common::start: initialization complete
2023-08-31T17:20:46.621581Z INFO localset-0 kumod::smtp_server: smtp listener on 0.0.0.0:2025 -> stopping
2023-08-31T17:20:46.622242Z INFO main kumo_server_common::start: Shutdown completed OK!
Error: Initialization raised an error: callback error
stack traceback:
[C]: in function 'kumo.on'
[string "/tmp/bad.lua"]:86: in function <[string "/tmp/bad.lua"]:6>
caused by: Attempting to register an event handler via `kumo.on('get_listener_domain', ...)` from within the event handler 'init'. You must move your event handler registration so that it is setup directly when the policy is loaded in order for it to consistently trigger and handle events.
```
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%