A simple tool that copies/moves messages from one IMAP mailbox (folder) to another.
It supports copying the messages as a one-time operation, or as a daemon (using IDLE for low-latency syncing).
imap-forward -upstream-url example.com:993 -upstream-username [email protected] -upstream-password himom -downstream-url other.example.com:993 -downstream-username [email protected] -downstream-password hidad
-once to copy instead of moving, and to run once and exit instead of syncing continuously.
This is just 200 LoC over go-imap 😉