Wez Furlong 250db18fae server-common: re-print initialization errors
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.
```
2023-08-31 10:21:11 -07:00
2023-03-06 07:53:27 -07:00
2023-02-10 16:44:10 -07:00
2023-06-21 18:10:15 -07:00
2023-02-21 21:18:49 -07:00
2023-02-21 21:18:49 -07:00
2023-03-09 20:56:02 -07:00
2023-06-22 13:50:51 -07: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%