Sign inSign up

digitaldriveio/walimap

By digitaldriveio

Updated 9 months ago

IMAP duplicate email remover with safe delete, tagging, move, OAuth2, and Docker support.

Image
Developer tools
0

1.2K

digitaldriveio/walimap repository overview

walimap

A duplicate email message remover for IMAP

walimap scans one or more IMAP mailboxes, detects duplicate messages, and tidies up all but the first copy. By default it marks later copies with \Deleted so you can review and purge using your mail client. Safe dry runs and non destructive tagging or moving are supported.

Key features

  • Per folder or global deduplication scope with stable UID based actions
  • Safe preview with --dry-run, optional --show headers
  • Flexible actions: mark \Deleted default, --only-tag <keyword>, --copy <mailbox>, --move [mailbox], optional --delete to expunge
  • Robust with throttling and retries, resume support, tunable batch sizes
  • Office 365 friendly with XOAUTH2 and RFC 6851 MOVE fallback logic
  • Docker ready, including rootless execution with /data as the writable mount point

Quick start

docker run --rm -it digitaldriveio/walimap:latest --help

Rootless example with mounted state and OAuth tokens:

chmod 755 ./data
docker run --rm -it \
  -v ${PWD}/data:/data \
  digitaldriveio/walimap:latest \
  --office365 -u [email protected] \
  --oauth-token-file /data/imap-oauth.txt \
  --resume \
  INBOX

Office 365 / Exchange Online

Use XOAUTH2 and IMAPS 993. Example:

walimap -s outlook.office365.com -x -u [email protected] \
  --oauth-token-file tokens.txt --global-dedup -M Dupes \
  INBOX "Archive 2023" "Archive 2022"

Defaults and scope

  • Dedup key: Message-ID header by default. Checksum mode available via -c with optional body bytes.
  • Scope: per folder by default. Use --global-dedup to treat the first listed folders as canonical.
  • Actions operate on UIDs to avoid invalid message set issues during reconnects or expunges.

Safety and performance

  • Start with --dry-run and consider --no-close if your server purges on CLOSE
  • Limit scope with --sentbefore d-MMM-yyyy for large mailboxes
  • Tune throughput via --batch-size, --action-batch-size, --throttle-sleep, --max-retries
  • Use --resume for long runs and --only-duplicates to reduce noise

Full documentation

Read the complete README, advanced OAuth guidance, examples, and troubleshooting on GitHub:
https://github.com/digital-drive/walimap

Tag summary

Content type

Image

Digest

sha256:f4ca54440

Size

48.5 MB

Last updated

11 months ago

docker pull digitaldriveio/walimap