Sync Mail Dir is a set of utilities to synchronize a pair of mailboxes in Maildir format using SSH to transfer data. It provides the smd-pull utility to pull changes made on the remote mailbox, smd-push to propagate local changes to the remote mailbox, and smd-loop to iterate push and pull in a timely way
Read more here:
syncmaildir 1.1.0