mirror of
https://github.com/draga79/NotiMail.git
synced 2026-04-26 14:15:54 +03:00
-
v2.0 Stable
released this
2025-02-22 16:50:18 +03:00 | 6 commits to main since this release📅 Originally published on GitHub: Sat, 22 Feb 2025 13:51:33 GMT
🏷️ Git tag created: Sat, 22 Feb 2025 13:50:18 GMTVersion 2.0
New Features:
-
Web Interface and API with Flask:
- Introduced a Flask-based web interface providing endpoints for service status (
/status), recent logs (/logs), and current configuration (/config). - The
/statusendpoint is publicly accessible and returns a simple status (OK or ERROR) indicating if all email accounts are connected and functioning properly. - When accessed with a valid API key, the
/statusendpoint provides detailed information about each monitored email account. - The
/logsand/configendpoints require an API key for access and are secured to prevent unauthorized viewing of sensitive information.
- Introduced a Flask-based web interface providing endpoints for service status (
-
Dynamic Configuration Reload:
- Implemented the ability to reload the configuration without restarting the service by sending a
SIGHUPsignal to the process. - The service re-reads the
config.inifile and updates its settings accordingly, allowing for dynamic adjustments.
- Implemented the ability to reload the configuration without restarting the service by sending a
-
Prometheus Metrics Integration:
- Integrated Prometheus client to expose metrics for monitoring service performance.
- Metrics include the total number of emails processed, notifications sent, processing time, and the number of errors encountered.
- Metrics are available via an HTTP endpoint, configurable in the
config.inifile.
Enhancements:
-
Optional Support for Apprise:
- Made the support for Apprise optional. If Apprise is not installed, the program continues to function using other notification providers (NTFY, Gotify, Pushover) without errors.
- At startup, the program logs whether Apprise is available and adjusts functionality accordingly.
-
Configurable Flask and Prometheus Servers:
- Both the Flask web interface and the Prometheus metrics server can now be enabled or disabled via the configuration file.
- If
FlaskHostandFlaskPortare not specified inconfig.ini, the Flask web interface will not start. - Similarly, if
PrometheusHostandPrometheusPortare not specified, the Prometheus metrics server will not start. - This provides flexibility in deploying the service with only the desired features enabled.
-
Improved Security in Web Interface:
- Implemented an API key mechanism for accessing sensitive endpoints (
/configand/logs). - Sensitive information such as passwords, tokens, and URLs are redacted in the
/configendpoint to prevent security breaches. - The
/statusendpoint provides detailed account information only when accessed with a valid API key.
- Implemented an API key mechanism for accessing sensitive endpoints (
-
Enhanced Logging:
- The program now logs the availability of optional modules (Apprise, Flask, Prometheus) and indicates which features are active based on the configuration.
- Improved logging practices to ensure that sensitive information (passwords, tokens) is never written to the logs.
Changes:
-
Refined
/statusEndpoint Behavior:- The
/statusendpoint now returns a simple status (OK or ERROR) when accessed without an API key, suitable for monitoring systems. - When accessed with a valid API key, it provides detailed status information for each email account.
- The
-
Conditional Module Imports:
- The imports for Apprise, Flask, and Prometheus are now conditional.
- If these libraries are not installed, the program continues to run without errors, and the associated features are automatically disabled.
- This allows for a more customizable setup based on available dependencies.
-
Configuration File Updates:
- Added new configuration options in
config.iniunder the[GENERAL]section:FlaskHostandFlaskPortfor configuring the Flask web interface.PrometheusHostandPrometheusPortfor configuring the Prometheus metrics server.APIKeyfor securing access to sensitive API endpoints.
- Updated the parsing logic to handle these new options and activate features accordingly.
- Added new configuration options in
Upgrade Notes:
-
Configuration Update Required:
- Update your
config.inifile to include the new configuration options if you wish to use the Flask web interface and Prometheus metrics server. - Add the
APIKeyunder the[GENERAL]section to secure access to the/configand/logsendpoints. - Existing configurations will continue to work, but adding the new options is necessary to enable the latest features.
- Update your
-
Library Dependencies:
- Install the
Flaskandprometheus_clientlibraries if you intend to use the web interface and Prometheus metrics.
- Install the
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-