tMaking rpsyncmail work again with rpwatchmail. - rohrpost - A commandline mail client to change the world as we see it.
 (HTM) git clone git://r-36.net/rohrpost
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit a3a638a970d0ece704556a84f18b076658add991
 (DIR) parent 8d46411dd2a40e88210c8ea7d6c1ae351983b46f
 (HTM) Author: Christoph Lohmann <20h@r-36.net>
       Date:   Sat, 16 Mar 2013 08:01:46 +0100
       
       Making rpsyncmail work again with rpwatchmail.
       
       Diffstat:
         bin/rpsyncmail                      |       7 +++++--
       
       1 file changed, 5 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/bin/rpsyncmail b/bin/rpsyncmail
       t@@ -1,13 +1,16 @@
        #!/bin/sh
        
       +export DOVECOT_PRESERVE_ENVS="SSH_AGENT_PID SSH_AUTH_SOCK"
       +dsynccmd="-u chrissi mirror ssh -i /home/chrissi/.ssh/id_rsa chrissi@r-36.net dsync -u chrissi"
       +
        if [ "$1" = "mb" ] || [ $# -eq 0 ];
        then
       -        dsync -R -u chrissi mirror chrissi@r-36.net
       +        dsync -R -u chrissi $dsynccmd
        else
                for i in $*;
                do
                        mailbox=$(echo $i | sed "s/^mb://g")
       -                dsync -R -m $mailbox -u chrissi mirror chrissi@r-36.net
       +                dsync -R -m $mailbox $dsynccmd
                done
        fi