fix(smtp_relay): emit service=smtp_relay in syslog so ingester can gate probe publish

SERVICE_NAME was hardcoded to 'smtp' in server.py; the ingester's probe
publish guard checked service == 'smtp_relay' and never matched.

Read SMTP_SERVICE_NAME from env (default 'smtp'); smtp_relay compose
fragment sets it to 'smtp_relay' so the two services are distinguishable.
This commit is contained in:
2026-04-30 12:31:29 -04:00
parent f0d47c5195
commit 761c23a07c
3 changed files with 3 additions and 81 deletions

View File

@@ -10,6 +10,7 @@ def test_smtp_relay_compose_fragment():
assert fragment["container_name"] == "test-decky-smtp_relay"
assert fragment["environment"]["SMTP_OPEN_RELAY"] == "1"
assert fragment["environment"]["SMTP_SERVICE_NAME"] == "smtp_relay"
assert fragment["environment"]["LOG_TARGET"] == "log-server"
def test_smtp_relay_custom_cfg():