# ImapNotification Lightweight utility to monitor an IMAP mailbox and emit notifications when new messages arrive. Intended to be used as a local helper, service, or integration point for scripts/webhooks. ## Features - Monitor one or more IMAP accounts/folders - Deliver notifications via command hook, webhook, or stdout - Support for polling and IMAP IDLE (when available) - Basic filtering by folder, sender, or subject patterns ## Quick start 1. Clone the repository: ``` git clone cd ImapNotification ``` 2. Provide configuration (environment variables or YAML/JSON). Example env vars: ``` IMAP_HOST=imap.example.com IMAP_PORT=993 IMAP_TLS=true IMAP_USER=user@example.com IMAP_PASS=yourpassword MAILBOX=INBOX POLL_INTERVAL=30 NOTIFY_COMMAND=/path/to/notify-script.sh USE_IDLE=true ``` Or a minimal YAML example (config.yml): ```yaml accounts: - host: imap.example.com port: 993 tls: true user: user@example.com pass: secret mailboxes: - INBOX settings: poll_interval: 30 use_idle: true notify_command: /usr/local/bin/notify.sh ``` 3. Run the program: ``` ./imap-notification --config config.yml ``` (or use the provided run/build instructions for this project) ## Configuration - host, port, tls, user, pass: IMAP connection details - mailboxes: list of folders to monitor - poll_interval: seconds between checks when not using IDLE - use_idle: enable IMAP IDLE if server supports it - notify_command / webhook: how to deliver notifications - filters: optional sender/subject/folder filters ## Logging & debugging - Enable verbose logging to troubleshoot connection or authentication issues. - Check firewall and IMAP server settings if connections fail. ## Contributing - Fork, create a feature branch, add tests, and submit a pull request. - Keep changes small and documented. Include rationale for new configuration options. ## License Specify your license in LICENSE file (e.g., MIT). For more detailed usage and examples, see the project docs or examples folder.