[sup-talk] Automatic watch of IMAP folder

4 views
Skip to first unread message

Matthieu Rakotojaona

unread,
Apr 3, 2014, 4:12:38 PM4/3/14
to sup-talk
Hello suppers,

I'm pretty sure some of you sync their mails from some IMAP server
somewhere, maybe Gmail even. I've written a little script that:

- allows you to watch your favorite IMAP folder ("[Gmail]/All mail" by
default)
- on your favorite server ("imaps://imap.gmail.com" by default)
- with your login/password
- run a custom command("offlineimap -u Quiet") whenever a new mail
arrives (triggered by an IDLE message)

The script is very simple, but should fit your needs without problems
(feel free to make it a little bit more flexible if you want to)

I've been running it in a tmux for a few days now, and it works good.
The real magic though is done by OfflineIMAP, which makes sure your
mails aren't eaten... and that allows me to be dirty on the details of
external script calls.

The script lives at
https://github.com/rakoo/idlewatch/blob/master/idlewatch.rb

--
Matthieu Rakotojaona
signature.asc

Gaute Hope

unread,
Apr 3, 2014, 4:23:14 PM4/3/14
to sup-talk
Excerpts from Matthieu Rakotojaona's message of 2014-04-03 22:12:38 +0200:
Excellent! I had something pretty hackish set up a while ago [0], didn't
really work - so gave it up! This will make a huge difference for me.

- gaute

[0] https://gist.github.com/gauteh/7942217
signature.asc
Reply all
Reply to author
Forward
0 new messages