From 75719aa37f7317f3a8feeb516f1444edb4274410 Mon Sep 17 00:00:00 2001 From: Jason McCormick Date: Thu, 5 Nov 2026 18:20:34 -0500 Subject: feat: TOML config and upload notification watcher Replace allowed-uris.txt with config.toml: [GLOBAL] holds SMTP settings (send_as, smtp_server, smtp_port, tls, starttls) and every other stanza is an upload URI with a recipient and optional view_url_prefix. Add watcher.py, run every 5 minutes by a systemd timer, which emails each drop's recipient once per run when new images appeared in the last slot. The email links each image under view_url_prefix and includes its .txt submission details. Fix the service unit and Makefile to use CONFIG_FILE, install the watcher and its units, and validate the config before restarting. Co-Authored-By: Claude Opus 5.5 --- config.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 config.toml (limited to 'config.toml') diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..c373438 --- /dev/null +++ b/config.toml @@ -0,0 +1,12 @@ +[GLOBAL] +send_as = "uploads@example.com" +smtp_server = "localhost" +smtp_port = 587 +tls = false +starttls = true + +[logo-contest] +recipient = "reviewer@example.com" +# Optional: where nginx serves this drop's files for viewing. Each notification +# links to . +view_url_prefix = "https://review.example.com/logo-contest/" -- cgit v1.2.3