Implement configurable STATE_DIR for state files

Move processed_message_ids.txt and last_run.txt to STATE_DIR,
configurable via .env. Install script creates ./state by default.

Changes:
- Add STATE_DIR to .env.example and config loading
- Update EmailForwarder to use os.path.join for file paths
- Add os.makedirs for state dir creation
- Update README with STATE_DIR option
This commit is contained in:
Jeena 2026-01-04 19:45:48 +09:00
parent 4adce1079f
commit a32f79980e
3 changed files with 13 additions and 10 deletions

View file

@ -7,6 +7,7 @@ DEST_PORT=993
DEST_USER=your@mxroute.com
DEST_PASS=password
FOLDERS=INBOX,Sent
STATE_DIR=./state
DRY_RUN=false
UPTIME_SUCCESS_URL=https://your-uptime-instance.com/api/push/your-token?status=up&msg=OK&ping=
UPTIME_FAIL_URL=https://your-uptime-instance.com/api/push/your-token?status=down&msg=Failed