Sync Mail Dir

A set of tools to synchronize a pair of mailboxes in Maildir format
Download

Sync Mail Dir Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL v3
  • Price:
  • FREE
  • Publisher Name:
  • Enrico Tassi
  • Publisher web site:
  • http://www.freepops.org

Sync Mail Dir Tags


Sync Mail Dir Description

A set of tools to synchronize a pair of mailboxes in Maildir format Sync Mail Dir (smd) differs from other solutions in terms of performances and lower installation requirements. The widespread solution IMAP-server plus OfflineIMAP requires an IMAP server to be installed. Alternatively Maildirsync requires no IMAP server, just ssh, but it used to load my laptop CPU too much and it seems its development stopped in 2004.Other general purpose tools like rsync or unison may work too, but not benefit from the fact that they are synchronizing mail messages. Sync Mail Dir is similar to Maildirsync in its design and requirements, but is more efficient, having its mechanisms written in C (around 700 lines), while policies are written in scripting languages like Lua and shell script (other 900 lines).Sync Mail Dir uses ssh to transmit and receive data, and to run commands on the remote host (but in principle it could use any bi-directional channel, like nc for example).Sync Mail Dir needs to be installed on both hosts: we call server the host we push to and pull from, we call client the host we push from and pull to. In the most common scenario, the server is our mail server, while the client is our laptop.The directory ~/.smd/ contains the configuration file(s), some fifo needed to short-circuit the softwares running on the client and on the server, and a cache file (called db-file from now on) that represents the status of the mailbox last time we successfully pushed. The configuration file is needed only on the client host (the one that will run smd-pull and smd-push).Sync Mail Dir is a layered set of tools, where low level tools are implemented in low level languages (to achieve decent performances) and high level tools are written in scripting languages (to achieve better flexibility). * mddiff is a small and hopefully efficient C program that given a db-file (a snapshot of a previous mailbox status) generates a set of actions (a diff) a client should perform to synchronize its local mailbox copy. It is a low level tool, not meant to be used directly by the user. * smd-server a simple script that calls mddiff to compute the diff, sends it to the client and then listen for client requests like getting a mail body or header. Even if this tool is simple to run, redirecting its input and output to smd-client over a network may not be straightforward, thus users should not call it directly. * smd-client a quite complex script applying a diff locally, eventually requesting data to the server. In case the diff cannot be applied cleanly, it outputs an error message that higher level tools should display to the user. As smd-server it is a quite high level tool, but should not be called directly by the average user. * smd-pull thanks to ssh, it executes smd-server on the server host and smd-client on the client host. This allows to pull remote changes and apply them locally. The remote mailbox is left untouched. This tool is meant to be called by the user. * smd-push thanks to ssh, it executes smd-client on the server host and smd-serer on the client host. This allows to push local changes and to apply them on the remote host. The local mailbox is left untouched. This tool is meant to be called by the user. * smd-loop runs runs smd-push and smd-pull at regular intervals as defined by the user in a configuration file, in the style of a crontab, but catches recoverable errors (like a, non recurrent, network problem), bailing out only in cases where human intervention is needed. This is the utility you may want to run if you are using a textual environment or a graphical one not based on GNOME. * smd-applet is an applet for the GNOME notification area, that runs smd-loop, eventually notifying the user for critical events and allowing him to solve them clicking on buttons instead of running commands from the shell.Installation:Syncmaildir is part of the Debian archive. If you are running Debian or one of its derivatives, you can install the syncmaildir and syncmaildir-applet packages with your favourite package manager.If you want to install it from source you need a C compiler, the development files for GLib, GNU make and sed. For smd-applet you also need the Vala compiler, libgee and GTK+ 2. You may also want to customize few variables in the Makefile. Then typing make && make install should be enough to have syncmaildir installed. Some known platforms are supported by templates defined at the end of Makefile, for example you may want to run make osx/text/all && make osx/text/install to properly build and install text mode only syncmaildir utilities on an MacOSX platform.Runtime dependencies are: ssh, xdelta, sha1sum, lua5.1 and bash.More documentation can be found on project's home page. What's New in This Release: DESIGN: · mention the ERROR action that mddiff can now emit smd-client: · understand the ERROR action mddiff.c: · use only EXIT_SUCCESS and EXIT_FAILURE as exit codes · ERROR macro calls exit(EXIT_FAILURE) end emits the ERROR action · new macro WARNING, used for what used to be non fatal errors · improved argument check: stat is done in advance, and we bail out if they are not omogeneous syncmaildir.lua: · handshake function emits 'network' as probable failure cause. Used to emit 'network-error', cheating smd-applet smd-client, smd-server, smd-common: · check for the existence of external helper programs to fail early if it is not the case smd-client, smd-server, syncmaildir.lua: · more comments in the code and better organization · littler refactoring for mkdir_p and tmp_for · added function to check for the existence of an external program using shell type command Makefile: · added abspath/* template to install the software hardcoding absolute paths for helper programs README, DESIGN: · fixed indentation so that markdown displays all blockquotes as such (kudos to Zack).


Sync Mail Dir Related Software