bitbot-irc / bitbot-modules

Community repository of vaguely useful plugins that are too niche for mainline BitBot
GNU General Public License v2.0
8 stars 3 forks source link

Maildir module #7

Open irl opened 5 years ago

irl commented 5 years ago

I'd like to request a new module that provides monitoring of a Maildir (or mbox if it's significantly easier, but Maildir is preferred) and notifies in a specified channel when new mails arrive. Using a format string it should be possible to define the notices that will appear, and they would contain things like the sender, received time and subject line. For bonus points, many-to-many mappings of Maildir folders to channels. This could either use some inotify magic or polling, but I'd like to deploy it on OpenBSD so it needs to work there and I'm not sure if inotify does.

Feel free to close if this is just too much work/not really suitable for this project.

jesopo commented 5 years ago

brilliant idea. cheers!

jesopo commented 5 years ago

supported in stdlib: https://docs.python.org/3/library/mailbox.html#maildir

jesopo commented 5 years ago

would be nice to get an example Maildir that I can test against - turns out my own stuff is kinda a screwed up twilight between Maildir and mbox :P