Migrate/copy mails between IMAP accounts.
Find a file
Jonas Kramer 513001b8b7 fix typo
2026-08-30 16:57:46 +02:00
example.yaml initial commit 2026-08-30 16:50:19 +02:00
imap-copy.pl initial commit 2026-08-30 16:50:19 +02:00
README.md fix typo 2026-08-30 16:57:46 +02:00

imap-copy

Hacked this long time ago when I moved to a new mail provider and the tools available back then for copying mails from one IMAP account to another weren't great or cost money. There are probably fancier tools around these days, but this is mine and it just does the job.

Installation

Install dependencies:

cpanm \
    Net::IMAP::Client \
    Term::ProgressBar \
    IO::Prompt \
    Getopt::Long::Descriptive \
    YAML::Tiny

Usage

Create a configuration file with the old and new accounts as well as the folders to copy (see example.yaml), then run perl imap-copy.pl -c your-config.yaml