Implement email forwarder

Add core IMAP forwarding logic with time-based searches and Message-ID
deduplication to prevent duplicates in destination mailbox.

Changes:
- Implement SINCE-based email search using last_run.txt for incremental forwarding
- Add Message-ID extraction and IMAP checks for deduplication
- Configure systemd user services with drop-in overrides for portability
- Integrate Uptime Kuma pings for monitoring
- Set up virtual environment for dependency isolation
- Update documentation and configuration templates
This commit is contained in:
Jeena 2026-01-04 14:09:02 +09:00
commit 686c4877d3
9 changed files with 389 additions and 0 deletions

12
email_forwarder.service Normal file
View file

@ -0,0 +1,12 @@
[Unit]
Description=Email Forwarder
[Service]
Type=oneshot
WorkingDirectory=${PROJECT_DIR}
ExecStart=${PROJECT_DIR}/venv/bin/python main.py
ExecStartPost=/usr/bin/curl -fsS --retry 3 ${UPTIME_SUCCESS_URL}
OnFailure=email_forwarder-fail-notify.service
[Install]
WantedBy=default.target