Commit graph

10 commits

Author SHA1 Message Date
8433e4a442 Simplify README by removing manual setup and dependencies
With the install script handling automation, remove redundant sections
to keep README concise.

Changes:
- Remove manual setup steps (covered by install.sh comments)
- Remove dependencies section (specified in pyproject.toml)
2026-01-04 17:32:30 +09:00
c06474dd0d Add AGENTS.md with project guidelines
Document GNOME commit style, code principles, testing, and security
practices for contributors.

Changes:
- Include commit guidelines
- Code style notes
- Testing and security reminders
2026-01-04 17:19:58 +09:00
9b7a6c5c07 Improve code style in load_state
Replace duplicate strip() calls with filter(None, generator) for
cleaner and more efficient processing of processed Message-IDs.

Changes:
- Use set(filter(None, (line.strip() for line in f))) to avoid calling
  strip() twice and filter empty lines
2026-01-04 16:54:13 +09:00
f2bc700939 Improve encapsulation in IMAP classes
Make all attributes private (_host, _imap, etc.) and remove redundant
public connect/disconnect methods. Connection management is now handled
internally by the orchestrator calling private _connect/_disconnect.

Changes:
- Privatize ImapClient attributes and methods
- Update EmailForwarder to call private connection methods
- Enhance encapsulation without changing functionality
2026-01-04 16:48:57 +09:00
f70f1853f0 Refactor main.py for readability and maintainability
Introduce class-based architecture with inheritance for IMAP clients:
- ImapClient base class with private low-level methods
- SourceImap and DestImap subclasses for specific operations
- EmailForwarder orchestrator class for coordination
- Global load_config and main functions

Improvements:
- Clear separation of concerns and encapsulation
- Private methods for internal IMAP calls
- Better error handling and logging
- Maintains all original functionality
2026-01-04 16:41:58 +09:00
485a5db8b9 Implement multi-folder synchronization
Add support for syncing multiple IMAP folders with auto-creation of missing
dest folders and configurable folder selection.

Changes:
- Update main.py to loop over folders, with auto-create for dest
- Add FOLDERS env var for all or specific folders
- Update .env.example and README for FOLDERS config
2026-01-04 16:27:54 +09:00
2ecdf33dc4 Add install script
Provide automated installation for Linux users to set up venv and systemd
services with proper path configuration.

Changes:
- Add install.sh with dependency checks, venv setup, and systemd configuration
- Update README to highlight automated install option
2026-01-04 16:20:46 +09:00
acec14553d Add sample drop-in config
Provide override.conf.sample as a template for customizing systemd
environment paths.

Changes:
- Rename override.conf to override.conf.sample with placeholders and comments
- Update README to instruct copying the sample
2026-01-04 16:15:04 +09:00
45b179ede3 Clean up unused code and config
Remove PROCESSED_FILE references and update .env.example with placeholder
Uptime URLs for privacy.

Changes:
- Remove unused processed_file variable and loading in main.py
- Update .env.example to use generic Uptime URLs
- Remove processed_uids.txt from .gitignore
2026-01-04 15:44:57 +09:00
686c4877d3 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
2026-01-04 15:34:31 +09:00