Metadata-Version: 2.4
Name: mail-deduplicate
Version: 7.6.2
Summary: 📧 CLI to deduplicate mails from mail boxes
Author-email: Kevin Deldycke <kevin@deldycke.com>
Project-URL: Homepage, https://github.com/kdeldycke/mail-deduplicate
Project-URL: Documentation, https://kdeldycke.github.io/mail-deduplicate
Project-URL: Repository, https://github.com/kdeldycke/mail-deduplicate
Project-URL: Funding, https://github.com/sponsors/kdeldycke
Project-URL: Issues, https://github.com/kdeldycke/mail-deduplicate/issues
Project-URL: Changelog, https://github.com/kdeldycke/mail-deduplicate/blob/main/changelog.md
Keywords: CLI,mail,email,maildir,mbox,deduplication,dedupe,cleanup,mailbox,Babyl,MH,mbox,MMDF
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Communications :: Email
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: arrow~=1.3.0
Requires-Dist: boltons~=25.0.0
Requires-Dist: click-extra~=4.15.0
Requires-Dist: tabulate[widechars]~=0.9
Provides-Extra: test
Requires-Dist: click-extra[pytest]~=4.15.0; extra == "test"
Requires-Dist: coverage[toml]~=7.6.7; extra == "test"
Requires-Dist: extra-platforms[pytest]~=2.1.0; extra == "test"
Requires-Dist: pytest~=8.3.3; extra == "test"
Requires-Dist: pytest-cov~=6.0.0; extra == "test"
Requires-Dist: pytest-github-actions-annotate-failures~=0.2.0; extra == "test"
Requires-Dist: pytest-randomly~=3.16.0; extra == "test"
Provides-Extra: typing
Requires-Dist: types-tabulate~=0.9.0.2; extra == "typing"
Provides-Extra: docs
Requires-Dist: click-extra[sphinx]~=4.15.0; extra == "docs"
Requires-Dist: furo~=2024.8.6; extra == "docs"
Requires-Dist: myst-parser~=4.0.0; extra == "docs"
Requires-Dist: sphinx~=8.1.3; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints~=2.5.0; extra == "docs"
Requires-Dist: sphinx-click~=6.0.0; extra == "docs"
Requires-Dist: sphinx-copybutton~=0.5.2; extra == "docs"
Requires-Dist: sphinx-design~=0.6.0; extra == "docs"
Requires-Dist: sphinx-issues~=5.0.0; extra == "docs"
Requires-Dist: sphinxcontrib-mermaid~=1.0.0; extra == "docs"
Requires-Dist: sphinxext-opengraph~=0.9.0; extra == "docs"
Requires-Dist: tomli~=2.0.1; python_version < "3.11" and extra == "docs"

<p align="center">
  <a href="https://github.com/kdeldycke/mail-deduplicate/">
    <img src="https://raw.githubusercontent.com/kdeldycke/mail-deduplicate/main/docs/assets/mail-deduplicate-logo-header.png" alt="Mail Deduplicate">
  </a>
</p>

[![Last release](https://img.shields.io/pypi/v/mail-deduplicate.svg)](https://pypi.python.org/pypi/mail-deduplicate)
[![Python versions](https://img.shields.io/pypi/pyversions/mail-deduplicate.svg)](https://pypi.python.org/pypi/mail-deduplicate)
[![Unittests status](https://github.com/kdeldycke/mail-deduplicate/actions/workflows/tests.yaml/badge.svg?branch=main)](https://github.com/kdeldycke/mail-deduplicate/actions/workflows/tests.yaml?query=branch%3Amain)
[![Documentation status](https://github.com/kdeldycke/mail-deduplicate/actions/workflows/docs.yaml/badge.svg?branch=main)](https://github.com/kdeldycke/mail-deduplicate/actions/workflows/docs.yaml?query=branch%3Amain)
[![Coverage status](https://codecov.io/gh/kdeldycke/mail-deduplicate/branch/main/graph/badge.svg)](https://app.codecov.io/gh/kdeldycke/mail-deduplicate)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7364256.svg)](https://doi.org/10.5281/zenodo.7364256)

**What is Mail Deduplicate?**

Provides the `mdedup` CLI, an utility to deduplicate mails from a set of boxes.

<p align="center">
  <img src="https://raw.githubusercontent.com/kdeldycke/mail-deduplicate/main/docs/assets/cli-coloured-header.png" alt="Mail Deduplicate">
</p>

## Features

- Duplicate detection based on cherry-picked and normalized mail
  headers.
- Fetch mails from multiple sources.
- Reads and writes to `mbox`, `maildir`, `babyl`, `mh` and `mmdf`
  formats.
- Deduplication strategies based on size, content, timestamp, file path
  or random choice.
- Copy, move or delete the resulting set of duplicates.
- Dry-run mode.
- Protection against false-positives with safety checks on size and content differences.
- Supports macOS, Linux and Windows.
- [Standalone executables](#executables) for Linux, macOS and Windows.
- Shell auto-completion for Bash, Zsh and Fish.

> ⚠️ **Warning**: Performances
>
> `mdedup` implementation is quite naive at the moment and everything resides in memory.
>
> If this is good enough for a volume of a couple of gigabytes, the more emails `mdedup` try to parse, the closer you'll reach the memory limits of your machine. In which case [`mdedup` will exit abruptly](https://github.com/kdeldycke/mail-deduplicate/issues/362#issuecomment-1266743045), zapped by the [OOM killer](https://en.wikipedia.org/wiki/Out_of_memory) of your OS. Of course your mileage may vary depending on your hardware.
>
> You can influence implementation of this feature with pull requests, [purchasing business support 🤝](https://github.com/sponsors/kdeldycke) and [sponsorship 🫶](https://github.com/sponsors/kdeldycke).

## Example

<p align="center">
  <img src="https://raw.githubusercontent.com/kdeldycke/mail-deduplicate/main/docs/assets/cli-coloured-run.png">
</p>

## Installation

### Python

[`uv`](https://docs.astral.sh/uv/getting-started/installation/) is the fastest way to run `mdedup` from sources on any platform, thanks to its [`uvx` command](https://docs.astral.sh/uv/guides/tools/#running-tools):

```shell-session
$ uvx --from mail-deduplicate mdedup
```

### Executables

Standalone binaries of `mdedup`'s latest version are available for several platforms and architectures:

| Platform    | `x86_64`                                                                                                                    | `arm64`                                                                                                                     |
| ----------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **Linux**   | [Download `mdedup-linux-x64.bin`](https://github.com/kdeldycke/workflows/releases/latest/download/mdedup-linux-x64.bin)     | [Download `mdedup-linux-arm64.bin`](https://github.com/kdeldycke/workflows/releases/latest/download/mdedup-linux-arm64.bin) |
| **macOS**   | [Download `mdedup-macos-x64.bin`](https://github.com/kdeldycke/workflows/releases/latest/download/mdedup-macos-x64.bin)     | [Download `mdedup-macos-arm64.bin`](https://github.com/kdeldycke/workflows/releases/latest/download/mdedup-macos-arm64.bin) |
| **Windows** | [Download `mdedup-windows-x64.exe`](https://github.com/kdeldycke/workflows/releases/latest/download/mdedup-windows-x64.exe) |                                                                                                                             |

Other
[alternatives installation methods](https://kdeldycke.github.io/mail-deduplicate/install.html)
are available in the documentation.
