Are there any plans to create (or is there any interest in creating) a daemon to trigger mbsync whenever there are changes to either remote or local mailboxes? I understand that most users simply create a cronjob to pull new mail at fixed intervals, but there are cases in which it's useful to see new messages as soon as they appear on the server (e.g., when receiving a 2FA authorization code from a bank login).
imapnotify does something like this, but it can go at least 15 minutes without detecting a dropped connection, and doesn't double-check that it missed any new messages within that window. I had considered writing my own script to do this, but it appears it would require a degree of technical competency I do not yet possess (and anyway, the only language I'm really good at is Ruby).
The daemon I am imagining would trigger a sync:
That means it would have to be able to detect system network changes (ideally this would happen passively, via a system notification, rather than periodic pinging to an external server), which was where my ability to tackle this problem really fell apart.
https://sourceforge.net/p/isync/isync/ci/master/tree/TODO
https://sourceforge.net/p/isync/mailman/search/?q=idle&mail_list=isync-devel
I can't find anything relevant in the links given by Oswald except the announcement by Ryan of his nifty little tool.
sourceforge.net/p/isync/mailman/message/35841876/
Sorry to disappoint, but I mever reallt got it to work and haven’t taken a second look at it in years.
Maybe it’s time to dust it off and give it another shot?
Last edit: Oswald Buddenhagen 2019-02-22
Sure, it would be awesome to have continuous, yet low-resource IMAP synchronization. I know absolutely no ruby.
I found another similar tool, but it uses python and getmail (which I cannot use because it does not support to leave messages on the server together with IDLE).
I will look into the option of using one of the biff options to initiate an mbsync
I am using "gnubiff -n --nogui" on a headless machine to watch the IMAP server via IDLE and have it call mbsync to sync new mails as they arrive. I still need to look into systemd to have this run as a service to restarted automatically when it crashes.
Every once in a while I'm delving into the code and trying to implement this feature myself. It's hard though.. I'm not experienced enough in C. Here's my attempt so far:
yeah. well. the problem isn't creating something, it's creating something serious, with sensible error handling, and good scalability. you can find a lot of related discussion when you're serious about it.