Using Syncthing to synchronise e-mail locally?

This is not really a support request or anything like that, but I am curious whether there exists any possible way to synchronise locally stored e-mail messages between different computers. Mobile (Android) support would be nice, but it is not really necessary, as I am mostly concerned about desktop PCs (i.e. Windows and possibly GNU/Linux).

What I mean exactly is something similar to using Radicale (see https://forum.syncthing.net/t/synchronize-calendars-and-contacts-syncthing) to synchronise calendars and contacts, but for e-mail messages.

I have personally experimented with synchronising local POP3 folders in Thunderbird, but the problem is that even when using the Mozilla’s Maildir format, Thunderbird itself is not capable of refreshing the messages on the fly. Specifically, the program needs to be closed and restarted in order to re-read the files, which makes it incapable of real-time synchronisation. This method does work for read only access though, which I guess is better than nothing :grin:.

The only alternative that I can think of, except for using 3rd party services, would be to set up a local IMAP server, but this has obvious drawbacks, such as the requirement of constant Internet access, possible security issues, and being painful to set up with dynamic IP addresses.

What I am doing right now is a kind of a hybrid method, where I still use a few 3rd party e-mail providers, but the messages themselves are downloaded with POP3 and stored locally only. My ultimate goal would be to stop using any 3rd party services all together, but this is not really feasible at the moment. However, I would still like to be able to have access to the downloaded messages on different devices.

If you run a dovecot server (with maildir format for storage) on all your devices this could probably work since it instantly updates in thunderbird if you remove/add a file in your maildir on the server.

I currently run a local mail server for archiving of old mails and sync the contents of the maildir for backup (no second mail server on the backup location). Not sure if the temporary files of syncthing cause any trouble but I can at least confirm that adding/removing files via file manager works correctly and instantly shows the changes. I guess you should also ignore some files created by dovecot if you want the sync the maildirs of two servers.

Running just the server for IMAP is easy, the harder part is sending/receiving which I did not set up for my server.

1 Like

Yes, setting up an IMAP server is extra work, but I would say it is unavoidable. IMAP is THE solution to the problem you described. (As far as I know.)