Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adham-elaraby/imap-daemon-notifier
IMAP listener to send instant push notifications when a new email is received.
https://github.com/adham-elaraby/imap-daemon-notifier
email-listener email-notification imap-idle push-notifications pushover-api
Last synced: about 1 month ago
JSON representation
IMAP listener to send instant push notifications when a new email is received.
- Host: GitHub
- URL: https://github.com/adham-elaraby/imap-daemon-notifier
- Owner: adham-elaraby
- License: gpl-3.0
- Created: 2024-08-14T18:47:08.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-24T18:08:37.000Z (4 months ago)
- Last Synced: 2024-08-24T19:26:16.746Z (4 months ago)
- Topics: email-listener, email-notification, imap-idle, push-notifications, pushover-api
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# imap-daemon-notifier
An IMAP listener that sends instant **push notifications** when a new email is received using **IMAP-IDLE**.
This Python script was created for my private use because my university's email service does not provide push notifications. Constant fetching on mobile devices caused significant battery drain issues while still not being instantaneous.![Screenshot](https://github.com/user-attachments/assets/afe3921f-50d9-4dbf-9a52-982fbec88f15)
## Features
- Push notifications (current implementation through PushOver)
- Sleep and Wind down during weekends
- Clean CLI interface and logging.## Possible Additions
- Own custom push notification platform/ other third-party services like IFTT
- Sender/Subject line logic for priority checking
## Usage
```
python3 -m venv pyenv.\pyenv\Scripts\Activate.ps1 (Powershell)
source pyenv/bin/activate (Bash)python3 -m pip install -r requirements.txt
```
Please fill the `.env` with your credentials. A template has been provided.## Tips and Tricks
**No Output to tty:**
`nohup python3 imap.py > /dev/shm/imap-idle-output.log &`**Blend output to tty:**
`nohup python3 imap.py | tee /dev/shm/imap-idle-output.log &`**Kill the background task:**
```
ps aux | grep imap
kill PID
```**To read the log:**
```
tail -f /dev/shm/imap-idle-output.log
cat /dev/shm/imap-idle-output.log
```## Note
I no longer use this script, so I am making it public, use at your own discretion. No Warranty is provided.