Created
September 12, 2020 07:19
-
-
Save pida42/b20bc089935ef06748a5ffbb7f245c24 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# imapcopy -- Sync IMAP accounts (from server account A to server account B) | |
# Copyright (C) 2016 Frantisek Preissler, <[email protected]> | |
# Released under the terms of The MIT License | |
#if [ $# != 4 ] | |
if [ $# != 1 ] | |
then | |
# echo Usage: imapcopy [SOURCE-USER] [SOURCE-PASS] [TARGET-USER] [TARGET-PASS] | |
echo Usage: imapcopy [USER] | |
exit 1 | |
fi | |
HOST1='mail.neco.com' | |
HOST2='zimbra.blabla.cz' | |
USER1="$1" | |
#USER2="$3" | |
USER2="$USER1" | |
#PASS1="$2" | |
PASS1="changeme" | |
#PASS2="$4" | |
PASS2="$PASS1" | |
/root/bin/Tools/imapsync/imapsync \ | |
--host1 $HOST1 \ | |
--user1 $USER1 \ | |
--password1 $PASS1 \ | |
--host2 $HOST2 \ | |
--user2 $USER2 \ | |
--password2 $PASS2 \ | |
--port1 993 \ | |
--port2 993 \ | |
--ssl1 \ | |
--ssl2 \ | |
--logfile /root/bin/Tools/imapsync.logs/$USER1.txt \ | |
--errorsmax 9999 | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment