rohrpost

A commandline mail client to change the world as we see it.
git clone git://r-36.net/rohrpost
Log | Files | Refs | LICENSE

commit 3a3279322fe3db30dbf6acd7a4474a0eb1e85586
parent f3fde2c32a0dcb2fd9a7addf14475623d5336bbe
Author: Christoph Lohmann <20h@r-36.net>
Date:   Tue, 12 May 2015 07:23:17 +0200

Add a command for individual synchronisation of mailboxes.

Diffstat:
bin/rpsync | 23+++++++++++++++++++++++
1 file changed, 23 insertions(+), 0 deletions(-)

diff --git a/bin/rpsync b/bin/rpsync @@ -0,0 +1,23 @@ +#!/bin/sh + +if [ $# -lt 1 ]; +then + printf "usage: %s mailbox\n" "$(basename $0)" >&2 + exit 1 +fi + +mailbox="$1" + +export DOVECOT_PRESERVE_ENVS="SSH_AGENT_PID SSH_AUTH_SOCK" +dsynccmd="-u chrissi mirror ssh -p 443 -i /home/chrissi/.ssh/id_rsa chrissi@mail.r-36.net dsync -u chrissi" + +dsync -m "${mailbox}" $dsynccmd +if [ $? -eq 0 ]; +then + printf "%s has been synchronized.\n" + exit 0 +fi + +printf "Synchronisation of %s failed.\n" +exit 1 +