Add Mailpit SMTP test server for Notification Service email testing

Adds a fourth Docker service (Mailpit) to capture outgoing emails without
delivery, with CLI tool for sending test emails, listing/reading captured
messages, and clearing the inbox. Supports BCC pattern matching ScadaLink's
notification delivery model.
This commit is contained in:
Joseph Doherty
2026-03-16 14:10:44 -04:00
parent 652378b470
commit 40610271d6
5 changed files with 337 additions and 7 deletions

View File

@@ -8,13 +8,14 @@ Local Docker-based test services for ScadaLink development.
docker compose up -d
```
This starts three services:
This starts four services:
| Service | Port | Purpose |
|---------|------|---------|
| OPC UA (Azure IoT OPC PLC) | 50000 (OPC UA), 8080 (web) | Simulated OPC UA server with ScadaLink-style tags |
| LDAP (GLAuth) | 3893 | Lightweight LDAP with test users/groups matching ScadaLink roles |
| MS SQL 2022 | 1433 | Configuration and machine data databases |
| SMTP (Mailpit) | 1025 (SMTP), 8025 (web) | Email capture for notification testing |
## First-Time SQL Setup
@@ -37,7 +38,7 @@ docker compose down
**Stop a single service** (leave the others running):
```bash
docker compose stop opcua # or: ldap, mssql
docker compose stop opcua # or: ldap, mssql, smtp
docker compose start opcua # bring it back without recreating
```
@@ -70,11 +71,12 @@ pip install -r tools/requirements.txt
> The `.venv` directory is gitignored.
**Quick readiness check** (all three services, with venv active):
**Quick readiness check** (all four services, with venv active):
```bash
python tools/opcua_tool.py check
python tools/ldap_tool.py check
python tools/mssql_tool.py check
python tools/smtp_tool.py check
```
| Tool | Service | Key Commands |
@@ -82,6 +84,7 @@ python tools/mssql_tool.py check
| `tools/opcua_tool.py` | OPC UA | `check`, `browse`, `read`, `write`, `monitor` |
| `tools/ldap_tool.py` | LDAP | `check`, `bind`, `search`, `users`, `groups` |
| `tools/mssql_tool.py` | MS SQL | `check`, `setup`, `query`, `tables` |
| `tools/smtp_tool.py` | SMTP (Mailpit) | `check`, `send`, `list`, `read`, `clear` |
Each tool supports `--help` for full usage. See the per-service docs below for detailed examples.
@@ -93,3 +96,4 @@ See the project root for per-service setup guides:
- [test_infra_opcua.md](../test_infra_opcua.md) — OPC UA server details
- [test_infra_ldap.md](../test_infra_ldap.md) — LDAP server details
- [test_infra_db.md](../test_infra_db.md) — MS SQL database details
- [test_infra_smtp.md](../test_infra_smtp.md) — SMTP server details (Mailpit)