From fd4085773a49c48ae3553fcfdea6a28560148b2b Mon Sep 17 00:00:00 2001 From: KacperLa Date: Wed, 26 Nov 2025 20:05:23 -0500 Subject: [PATCH] Add systemd service scripts and convenience wrappers to README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 2f8766a..abdcf90 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,12 @@ python3 email_tunnel.py Run under a process supervisor (systemd, supervisord, etc.) so restarts and log rotation are handled. +### Systemd helpers +- `email_tunnel.service`: unit file to run the tunnel under systemd (adjust paths/user/group as needed). +- `install_email_tunnel.sh`: installs/enables/starts the service, validating `.env` and byte-compiling the script. +- `uninstall_email_tunnel.sh`: stops, disables, and removes the service unit. +- `logs_email_tunnel.sh`: convenience wrapper around `journalctl` for viewing service logs/status. + ## Operational behavior - State tracking: `STATE_FILE` records the last successfully handled UID. It is only advanced after successful delivery, or after a logged `DeliveryError` to avoid reprocessing a permanently failed message. - Retries: IMAP SEARCH/FETCH and SMTP SEND are retried up to 3 times with small backoff. Persistent failures log and move on.