bobf is sharing code with you
Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.
Don't show this againhg clone https://bitbucket.org/bobf/imapfetchd/wiki
imapfetchd
Overview
getmail4 and cron is a reliable, robust combination of tools for getting emails from mail servers and it's worked great for me for a long time. Unfortunately, it means I have to wait for the next cronjob to trigger before I get new mails, so I was forever manually calling getmail when somebody in the office asked "Have you read my mail ?", and getmail seems to take quite a long time to create a new connection, check for mails and dispatch them (maybe 10 seconds or so at the moment), so it wasn't ideal.
So, this is the reason for writing this simple IMAP4 fetcher daemon that sits on a persistent connection, polling frequently for new mails and passing them to a MDA.
It's got a couple of bugs at the moment in not dealing with connections being closed badly and reconnects not being issued but largely it's working well. I'll do a release when I've fixed these bugs. I'm also waiting for Twisted's IMAP4 implementation to add client IDLE support so we don't need to poll for new mails, but I'm waiting on somebody else who may have already done this for me before I do the work myself.
This revision is from 2010-02-16 17:21