Add the "alert" logging level
Back when I started developing maddy, I did not see the value in introducing a big number of logging levels. The ones currently defined are basically "info" and "debug" with latter being hidden by default.
I propose to introduce the logging level to indicate messages that require immediate action by the server administrator, such as errors that prevent security mechanisms from working correctly and may cause security downgrade. This level can be handled differently by the logging subsystem used (e.g. journalctl utility can highlight such messages with a bright color to make them more visible). A monitoring system deployed can email the administrator and so on.
On other levels that someone might think are worth introducing:
- Error Non-exceptional errors happen all day during the normal mail server operation (ranging from bots hitting security policies to buggy recipient DNS servers). They are generally not worth being handled specially.
- Notice, Warning Should be "Alert" if it is really important or "Info" if server can figure it out without the human intervention.