feat(notifications): SMTP delivery policy settable via management/CLI/UI (#149)

SmtpConfiguration.MaxRetries/RetryDelay (and ConnectionTimeoutSeconds/
MaxConcurrentConnections) drive the outbox Email policy but had no write
path, so every row sat at 0/0 and was clamped with a Warning; DEV vd03 had
to be fixed by direct SQL.

- Update/CreateSmtpConfigCommand: four trailing additive nullable fields
  (null = preserve on update / entity default on create; 0 = fallback).
- ManagementActor: preserve-if-null, negatives refused.
- CLI notification smtp create|update: --max-retries, --retry-delay-seconds,
  --connection-timeout-seconds, --max-concurrent-connections (>= 0).
- Central UI /notifications/smtp: fields on the form + read-only panel;
  new rows pre-fill 10 retries / 60 s.
- README + Component-NotificationService; tests for apply/preserve/reject.
This commit is contained in:
Joseph Doherty
2026-11-25 10:54:20 -05:00
parent a87c05754a
commit a4523e090e
9 changed files with 268 additions and 21 deletions
@@ -52,7 +52,7 @@ The SMTP configuration is defined centrally and used by the central Email delive
- **From address**: The sender email address for all notifications (e.g., `scada-notifications@company.com`).
- **Connection timeout**: Maximum time to wait for SMTP connection (default: 30 seconds).
- **Max concurrent connections**: Maximum simultaneous SMTP connections from the central cluster (default: 5). Enforced by the Notification Outbox dispatcher, which clamps each sweep's Email parallelism to `min(MaxParallelDeliveries, MaxConcurrentConnections)` for the SMTP transport (a non-positive value applies no clamp).
- **Retry settings**: Max retry count, fixed time between retries. The Notification Outbox reuses these for delivery retry of transient failures.
- **Retry settings**: Max retry count, fixed time between retries. The Notification Outbox reuses these for delivery retry of transient failures. Set via CLI `notification smtp create|update --max-retries/--retry-delay-seconds` (also `--connection-timeout-seconds`/`--max-concurrent-connections`) or the Central UI `/notifications/smtp` form; omitted values are preserved on update and negatives are refused. A zero value means the outbox fallback (10 retries / 1-minute delay, clamped with a Warning); the UI pre-fills 10 / 60 s on a new row so the policy is explicit (#149).
- **Transport**: The submission mechanism — `Smtp` (default) or `Ews`. Null/empty means `Smtp`, so every pre-existing row keeps its behavior. See EWS Transport below.
### EWS Transport (on-prem Exchange)