Thanks to visit codestin.com
Credit goes to lib.rs

#imap #backup

app imbak

A command line tool for backing up IMAP mailboxes

5 unstable releases

0.3.1 Oct 13, 2025
0.3.0 Oct 13, 2025
0.2.0 Oct 9, 2025
0.1.1 Jul 8, 2023
0.1.0 Jul 8, 2023

#48 in Email

MIT license

16KB
353 lines

IMBak

A command line tool for backing up IMAP mailboxes written in Rust

Usage

On running the command you will be prompted to input a username (email) and password. In non-interactive environments you can set the IMAP_USERNAME and IMAP_PASSWORD environment variables.

List Mailboxes

imbak list-mailboxes \
  --domain imap.example.com \
  --port 993

Backup

Example 1

Download all emails from the default mailbox (INBOX) to the current working directory using the default batch size (5).

imbak backup \
  --domain imap.example.com \
  --port 993

Example 2

All options.

imbak backup \
  --domain imap.example.com \
  --port 993 \
  --mailbox INBOX \
  --batch-size 5 \
  --output-directory . \
  --from 0 \
  --count 100

Dependencies

~6–20MB
~248K SLoC