Skip to content

Instantly share code, notes, and snippets.

@wrouesnel
wrouesnel / getmail-idler.py
Last active April 4, 2018 22:34
A script to invoke getmail when accounts receive new mail. See http://wrouesnel.github.io/articles/A%20better%20Getmail%20IDLE%20client/ for more details.
#!/usr/bin/env python
# Getmail Idler Script v2
# Will Rouesnel
#
# This is a pure Python threading affair - there are better ways to do things
# epoll but there are much better libraries (like gevent) for that type of
# thing.
#
# Note: this script assumes you're running getmail with the "delete" option for
# the mailbox it checks - i.e. your inbox should always be cleared of all mail.