feat: add apprise notification delivery
This commit is contained in:
@@ -74,18 +74,17 @@ For database operations, use the [Database Backup and Restore](backups.md) guide
|
||||
| `MAX_UPLOAD_SIZE` | Maximum file upload size (MB) | `10` | `20`, `50` |
|
||||
| `SESSION_LIFETIME` | Session lifetime in minutes | `1440` (24h) | `60`, `720` |
|
||||
|
||||
### Alerting Configuration
|
||||
### Notification Configuration
|
||||
|
||||
| Variable | Description | Default | Example |
|
||||
|----------|-------------|---------|---------|
|
||||
| `ALERTS_ENABLED` | Enable alerts | `false` | `true`, `false` |
|
||||
| `ALERT_EMAIL` | Email to send alerts to | - | `admin@example.com` |
|
||||
| `SMTP_SERVER` | SMTP server for sending alerts | - | `smtp.gmail.com` |
|
||||
| `SMTP_PORT` | SMTP port | `587` | `587`, `465` |
|
||||
| `SMTP_USERNAME` | SMTP username | - | `alerts@example.com` |
|
||||
| `SMTP_PASSWORD` | SMTP password | - | `smtp_password` |
|
||||
| `SMTP_USE_TLS` | Use TLS for SMTP | `true` | `true`, `false` |
|
||||
| `ALERT_THRESHOLD` | Compliance threshold for alerts | `90` | `80`, `95` |
|
||||
DMARQ stores notification targets in the web settings table. Configure them under
|
||||
**Settings** > **Notifications** and use newline-separated Apprise URLs, such as
|
||||
email, Slack, Teams, Discord, or webhook targets. Saved target URLs are redacted
|
||||
from API responses.
|
||||
|
||||
| Setting | Description | Default | Example |
|
||||
|---------|-------------|---------|---------|
|
||||
| `notifications.apprise_enabled` | Enable Apprise notification delivery | `false` | `true` |
|
||||
| `notifications.apprise_urls` | Newline-separated Apprise target URLs | - | `mailto://user:pass@example.com` |
|
||||
|
||||
### Cloudflare Integration
|
||||
|
||||
@@ -143,18 +142,12 @@ IMAP_POLLING_INTERVAL=30
|
||||
IMAP_MARK_AS_READ=true
|
||||
```
|
||||
|
||||
### With Email Alerting
|
||||
### With Apprise Notifications
|
||||
|
||||
```
|
||||
ALERTS_ENABLED=true
|
||||
ALERT_EMAIL=admin@example.com
|
||||
SMTP_SERVER=smtp.gmail.com
|
||||
SMTP_PORT=587
|
||||
SMTP_USERNAME=alerts@example.com
|
||||
SMTP_PASSWORD=smtp_password
|
||||
SMTP_USE_TLS=true
|
||||
ALERT_THRESHOLD=95
|
||||
```
|
||||
1. Open **Settings** > **Notifications**.
|
||||
2. Enable notifications.
|
||||
3. Add one Apprise target URL per line.
|
||||
4. Save and use **Send Test** to verify delivery.
|
||||
|
||||
## Configuration Hierarchy
|
||||
|
||||
@@ -192,6 +185,6 @@ DMARQ validates your configuration on startup. If there are issues, they will be
|
||||
- Database connection parameters
|
||||
- Secret key presence and strength
|
||||
- IMAP credentials (if IMAP is enabled)
|
||||
- SMTP credentials (if alerting is enabled)
|
||||
- Notification targets can be tested from the settings page
|
||||
|
||||
Check the application logs if you encounter startup issues related to configuration.
|
||||
|
||||
@@ -83,7 +83,7 @@ Follow-up:
|
||||
|
||||
## Later Milestones
|
||||
|
||||
- Notifications and alert rules with Apprise.
|
||||
- Notifications and alert rules. Apprise delivery and test notifications are in place; alert rules, summaries, and alert history remain.
|
||||
- DNS health and Cloudflare read-only inspection.
|
||||
- Guided setup and operator health screens.
|
||||
- Forensic/RUF report support.
|
||||
|
||||
+6
-3
@@ -107,15 +107,18 @@ Exit criteria:
|
||||
|
||||
## Milestone 7: Notifications and Alert Rules
|
||||
|
||||
Status: Planned
|
||||
Status: In progress
|
||||
|
||||
Goal: notify administrators when action is needed.
|
||||
|
||||
Delivered:
|
||||
- Apprise notification integration for newline-separated notification target URLs.
|
||||
- Notification settings UI can save Apprise targets, keeps target URLs redacted after save, and can send a test notification.
|
||||
|
||||
Planned:
|
||||
- Apprise notification integration.
|
||||
- Alert rules for new sender source, compliance drop, DMARC failures above threshold, and missing reports.
|
||||
- Daily/weekly summary notifications.
|
||||
- Alert history and test-notification UI.
|
||||
- Alert history.
|
||||
|
||||
Exit criteria:
|
||||
- A user can receive meaningful alerts without opening the dashboard daily.
|
||||
|
||||
+4
-1
@@ -164,7 +164,10 @@ Status: Complete for the delivered reporting milestone. Alert-specific dashboard
|
||||
- [x] Add startup checks for production-critical configuration
|
||||
- [x] Add backup/restore guidance for database deployments
|
||||
- [x] Add release checklist covering migrations, tests, and smoke checks
|
||||
- [ ] Apprise notifications and alert rules
|
||||
- [x] Add Apprise notification delivery and test notification support
|
||||
- [ ] Add alert rules for new sender source, compliance drop, DMARC failures above threshold, and missing reports
|
||||
- [ ] Add daily and weekly summary notifications
|
||||
- [ ] Add alert history
|
||||
- [ ] DNS health guidance and Cloudflare read-only inspection
|
||||
- [ ] Guided setup and operator health pages
|
||||
- [ ] Forensic/RUF report support
|
||||
|
||||
+14
-13
@@ -29,15 +29,18 @@ System-wide settings are available to administrators:
|
||||
|
||||
## Notification Settings
|
||||
|
||||
### Email Notifications
|
||||
### Apprise Notifications
|
||||
|
||||
Configure how you receive email notifications:
|
||||
Configure where DMARQ sends notifications:
|
||||
|
||||
1. Navigate to **Settings** > **Notifications** > **Email**
|
||||
2. Configure the following:
|
||||
- **Email Address**: Where notifications will be sent
|
||||
- **Notification Frequency**: Immediate, daily digest, or weekly summary
|
||||
- **Notification Types**: Select which events trigger notifications
|
||||
1. Navigate to **Settings**.
|
||||
2. Open **Notifications**.
|
||||
3. Enable notifications.
|
||||
4. Add one Apprise target URL per line.
|
||||
5. Save and use **Send Test** to verify delivery.
|
||||
|
||||
Target URLs are redacted after saving so credentials are not exposed through the
|
||||
settings API or page reloads.
|
||||
|
||||
### Alert Thresholds
|
||||
|
||||
@@ -52,11 +55,9 @@ Set thresholds for when alerts are triggered:
|
||||
|
||||
### Integration Notifications
|
||||
|
||||
If you've enabled additional notification channels through Apprise:
|
||||
|
||||
1. Navigate to **Settings** > **Notifications** > **Integrations**
|
||||
2. Configure each integration separately (Slack, Teams, Discord, etc.)
|
||||
3. Set which notification types go to each channel
|
||||
Apprise supports email, Slack, Teams, Discord, generic webhooks, and many other
|
||||
targets through the same notification field. Add each destination on a separate
|
||||
line.
|
||||
|
||||
## API Access
|
||||
|
||||
@@ -139,4 +140,4 @@ Advanced configuration options (administrators only):
|
||||
- **Database Connection**: Change database settings
|
||||
- **Worker Configuration**: Configure background processing settings
|
||||
- **Caching**: Adjust cache settings for performance
|
||||
- **Debug Mode**: Enable additional logging for troubleshooting
|
||||
- **Debug Mode**: Enable additional logging for troubleshooting
|
||||
|
||||
Reference in New Issue
Block a user