Hi all, I have a (possibly silly) idea for my set-up that basically involves mbsync running continuously as a daemon, in the way that IMAP was designed to do. I think this has already been discussed on this list (see below [0][1][2]), but AFAIK it's not actually possible yet. So I'm basically asking a) are there existing tools available to do this? (I do not have shell access to the remote servers) b) if not, is anyone working on it? c) if not, is it something you might consider adding in a later release, or accepting a patch for? d) for any feedback anyone has on this.
The setup I have now uses mbsync run every few minutes (5 at the moment, poor server people :P) to re-synchronise mailboxes. This is done for about six different mail accounts from various providers (several are Gmail accounts). This obviously has the problem that it can take up to five and a half minutes for me to be aware that new mail has arrived (the periodic check once the initial sync has been done takes about 30-40 seconds for the lot). Ideally, I'd have mbsync run as a daemon, make a connection to the remote IMAP server and then sit there watching both the remote IMAP folders and the local maildirs. IMAP push notifications would trigger it to download changes and sieve them into my local copy; local modifications would trigger it to upload the changes. It doesn't seem /totally/ ridiculous - after all, this is more-or-less what clients such as Thunderbird do. Two prior postings to the list I've found are [0] and [1]. [0] includes a "I've thought about it but not implemented it" from 2007; [1] contains an FYI regarding mswatch from 2014, which as I've pointed out isn't going to cut it as I don't have shell access to the servers. In any case, IMAP is already capable of pushing notifications to clients, so a separate channel is technically unnecessary. I also found a TODO entry, which pointed me to a further post [2] and another RFC [3]. The way I'd see this being possible would be - for remote changes, using the full functionality of IMAP to receive notifications pushed from the server in order to trigger a sync. Wikipedia[4] suggests that this is possible, and a skim of the RFC doesn't rule it out at least[5][6][3]. Presumably you might need an extra couple of lines in the mbsync config (Subscribe etc.), if I've divined the use of SUBSCRIBEd mailboxes correctly. - for local changes, monitoring the local maildir with file descriptors (as far as I can tell, mbsync is written for UNIX only, so inotify or dnotify both appear at first read to be appropriate here (though [7] suggests it may be impracticable for large maildirs or large numbers of accounts)). An alternative which'd possibly be better from an engineering point of view is libev[8] (though mbsync doesn't already use it, so). I've not used these or similar kernel subsystems before, though, so feedback is much appreciated on that. So the crux: a) are there existing tools available to do this (I do not have shell access to the remote servers)? b) if not, is anyone working on it? c) if not, is it something you might consider adding in a later release, or accepting a patch for? d) any other feedback is welcome. If the answer to (b) or (c) is yes, I am able to provide some help ^.^. Best wishes, allicoder [0] http://sourceforge.net/p/isync/mailman/message/1473227/ [1] http://sourceforge.net/p/isync/mailman/message/32989263/ [2] http://sourceforge.net/p/isync/mailman/message/30353955/ [3] http://tools.ietf.org/html/rfc5465 [4] https://en.wikipedia.org/wiki/Internet_Message_Access_Protocol#Connected_and_disconnected_modes_of_operation [5] https://tools.ietf.org/html/rfc3501#section-5.2 [6] https://tools.ietf.org/html/rfc3501#section-7.4.2 [7] http://stefan.buettcher.org/cs/fschange/index.html [8] http://software.schmorp.de/pkg/libev.html -- PGP key available on request
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel