Copy recursively all email messages and folders from one imap account to another
docker run -it --name imapcopy jfisbein/imapcopy --source imap://peter:[email protected] --target imaps://peter%40gmail.com:[email protected] --fromDate 2018-02-01 --toDate 2019-01-01 --excluded Spam INBOX [Gmail] Spam Drafts Bin "Bart Simpson"
-
Download the application from the repository
-
build de jar:
mvn clean package -
Run the application:
java -jar target/imapcopy-x.y.z.jar --source sourceImapAccount --target targetImapAccount --fromDate filterFromDate --toDate filterToDate --excluded [list of exlcuded folders] (ex: java -jar target/imapcopy-1.1.0.jar --source imap://peter:[email protected] --target imaps://peter%40gmail.com:[email protected] --fromDate 2018-02-01 --toDate 2019-01-01 --excluded Spam INBOX [Gmail])
{protocol}://[user:password@]{host}[:port]
Where
protocolcan beimaporimapsuserandpasswordare optional and must be url escaped (ex:[email protected]becomespeter%40gmail.com)host: host of the imap serverport: port of the imap server