How to sync 2 folders on 2 remote computers via Email?

72 views Asked by At

It is quite weird question for the first look, but in case if you work for company or organization where are very strict rules to communicate with outer world, then it is not so funny.

For example, it's very usual when bank or enterprise company doesn't allow to access to its inner resources from outside, so that neither tunnel nor VPN are possible, and the only way to push information into inner area is Email messages. But even Email messages in such companies have several restrictions - e.g. "prohibited" or "dangerous" media content.

But it looks completely doable to setup some kind of email bridge, when both sides - e.g. worker's laptop at home and his desktop computer in office - will exchange data, syncing dedicated folders by sending email messages to each other. Such bridge may deal with messages that are completely eligible according to company's policies.

1

There are 1 answers

0
domax On

I created such a bridge and published it in Github: https://github.com/domax/email-bridge

In short words how it works:

When application runs, first of all it scans your EWS inbox for transport email, matching subject to specific pattern and, if such emails found, extracts files from their attachments. Then it waits for new messages and does the same for all new matched emails. All transport emails are removed automatically.

Just after email Inbox was scanned, application scans its "outbox" folder. If there are files which names are matched to specific regexp pattern, these files are gathered as attachments into new email message, and this email message is sent away with specific subject. Then application waits for new files in "outbox" folder and does the same for all new files there.

Only files (not sub-folders) are synchronized between computers. That's by design limitation, b/c application's "inbox" and "outbox" folders purpose is to temporarily keep VCS (Git) patches or bundles that in fact is plain file list, so that any kind of file hierarchy support is business of VCS.