Changes, or online access, could be done using any standard remote file access method, such as sftp.
Are there downsides to this approach?
Changes, or online access, could be done using any standard remote file access method, such as sftp.
Are there downsides to this approach?
You need to be able to push email status changes out to connected devices, I don't want an alert for an email on phone if I've already read it on my laptop.
You need decisions around how attachments are stored. Most of the time you'll want to store the attachments separately from the text content of the email so clients don't have to download the attachments to access the text, so you'll need to decide on how this location would be communicated to a client.
Plain files are rather bad for multi-user access, if you have multiple users/devices all accessing the same email they're going to need some protocol for synchronization so you don't get data corruption or lost changes.
Git's garbage collection would eventually remove references to orphaned objects and the transfer protocols would only push (or fetch) objects the other repository doesn't have.
I don't know how it would scale in terms of performance though.
This. This sucks so much. Even gmail can't automatically dismiss a notification when I read a mail on the desktop!
IMAP/JMAP will work fine in those conditions, as a client can simply fetch the list of folders and a few email headers, and then lazily fetch email bodies on demand. Updating the read status is pretty cheap and does not require a full sync between the device and server, and so on.
Also, some IMAP servers store message flags in the filename (when using Maildir). This means that a message that goes from unread to read, it would appear to rsync that one file was deleted and another created (as the filename on disk has changed); the "newly created" file (which could be many MBs in size, depending on its contents/attachments) would then have to be completely synchronized again.
I didn't realize just how inefficient it was until a few days ago when I read an article [0] comparing rsync against ZFS replication (even if you're not familiar with ZFS, you'll understand).
[0]: http://arstechnica.com/information-technology/2015/12/rsync-...
If you run it the normal way this is (sadly) true.
However you can use the `--fuzzy` flag to make the behaviour a little more clever in handling this specific case.