#!/bin/bash -eux USER="username.surname" LOGIN="${USER}@example.com" PASS="userpass" IMAP="imap.example.com" SUBFOLDER=${USER/./_} SUBFOLDER="archive-${SUBFOLDER}" ARGS="--host1 ${IMAP} --user1 ${LOGIN} --password1 ${PASS}" ARGS="${ARGS} --host2 imap.destination.example.com --user2 archive@destination.example.com --password2 dest_pass --subfolder2 ${SUBFOLDER}" #ARGS="${ARGS} --dry" eval docker run gilleslamiral/imapsync /usr/bin/imapsync ${ARGS}