Description
imapbackup is a Python script that makes full backups of IMAP mailboxes to your disk. It copies every message from every folder, or from a chosen subset of folders, and saves them in the standard mbox format, which Mail.app can import through its Other option. Backups are incremental, so the script tries hard not to copy a message twice. It only performs read operations on the IMAP server, which keeps the source mailbox untouched. The script has zero dependencies. An optional on-the-fly compression feature exists only in the Python 2 version. The project began around 2007 as a way to back up old mailboxes from Mac OS X Mail.app, and the author later re-licensed it under the MIT license for use as a systems administration tool. The README lists three script versions: imapbackup.py for Python 2.5 and later is legacy and no longer updated, imapbackup38.py for Python 3.8 and later is in maintenance, and imapbackup312.py for Python 3.12 and later is experimental, with structured configuration, improved error handling and quiet mode. The README has a quick start for Python 3.12. It suits people who want a self-contained way to archive email from an IMAP account.…
Highlights
- Copies every message from every IMAP folder
- Incremental backups that avoid duplicate copies
- Saves standard mbox files for Mail.app
- Zero dependencies and read-only IMAP access
- Three script versions for Python 2, 3.8 and 3.12
Ratings & Reviews
No ratings yet
Be the first to rate Imapbackup.
People also visit
Imapbackup FAQ
What does imapbackup do?
It copies the messages from an IMAP mailbox to your disk, saving them in mbox format so you can import them later.
Is it incremental?
Yes. It tries very hard not to copy a message twice on later runs.
Is it safe for my mailbox?
The README says the script only performs read operations on the IMAP server.
Which Python version do I need?
The README lists three scripts: a legacy Python 2.5+ script, a Python 3.8+ maintenance script, and an experimental Python 3.12+ script. It has a quick start for Python 3.12.
What license is it under?
MIT. The author re-licensed the code under MIT when posting it on GitHub.
What are the best Imapbackup alternatives?
Popular alternatives to Imapbackup include Imap Backup, Bichon and mail-archiver. See all Imapbackup alternatives





