{
  "slug": "mbox-dedup",
  "name": "gizza-ai/mbox-dedup",
  "version": "0.1.0",
  "title": "MBOX Dedup — remove duplicate emails by Message-ID — gizza.ai",
  "description": "Paste an mbox archive and remove duplicate messages by Message-ID. Keep first or last, handle ID-less messages, and download the cleaned mbox locally.",
  "tags": [
    "mbox dedup",
    "mbox duplicate remover",
    "message-id dedupe",
    "email archive cleanup",
    "mailbox deduplicate",
    "remove duplicate emails",
    "mbox cleaner",
    "email message id"
  ],
  "category": "utilities",
  "urls": {
    "page": "https://gizza.ai/tools/mbox-dedup/",
    "markdown": "https://gizza.ai/tools/mbox-dedup/index.md",
    "descriptor": "https://gizza.ai/tools/mbox-dedup/tool.json",
    "deep_link_example": "https://gizza.ai/tools/mbox-dedup/?mbox=From%20alice%40example.com%20Mon%20Sep%2003%2010%3A00%3A00%202018%0AFrom%3A%20Alice%20%3Calice%40example.com%3E%0ASubject%3A%20Hello%0AMessage-ID%3A%20%3Ca1%40example.com%3E%0A%0Afirst%20copy%0A%0AFrom%20alice%40example.com%20Mon%20Sep%2003%2011%3A00%3A00%202018%0AFrom%3A%20Alice%20%3Calice%40example.com%3E%0ASubject%3A%20Hello%20again%0AMessage-ID%3A%20%3Ca1%40example.com%3E%0A%0Aduplicate%20copy&keep=first&ignore_case=true&no_message_id=keep"
  },
  "cli": "gizza tool mbox-dedup \"From alice@example.com Mon Sep 03 10:00:00 2018\nFrom: Alice <alice@example.com>\nSubject: Hello\nMessage-ID: <a1@example.com>\n\nfirst copy\n\nFrom alice@example.com Mon Sep 03 11:00:00 2018\nFrom: Alice <alice@example.com>\nSubject: Hello again\nMessage-ID: <a1@example.com>\n\nduplicate copy\"",
  "tool": {
    "description": "Find and remove duplicate messages in an mbox archive by their Message-ID header, returning the de-duplicated mbox text plus a summary (total/kept/removed message counts, how many had no Message-ID, and how many IDs were duplicated). Messages are split on the classic `From ` postmark lines and each surviving message is preserved verbatim. By default the first occurrence of each Message-ID is kept and original order is preserved; set keep=\"last\" to keep the last. Message-IDs are normalized (surrounding angle brackets and whitespace stripped) and compared case-sensitively unless ignore_case=true. Messages lacking a Message-ID are kept by default (never merged); set no_message_id=\"drop\" to remove them. Runs locally.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "ignore_case": {
          "default": false,
          "description": "Compare Message-IDs case-insensitively. RFC 5322 Message-IDs are case-sensitive, so this is off by default; turn it on if an exporter changed the case of otherwise-identical IDs.",
          "type": "boolean"
        },
        "keep": {
          "default": "first",
          "description": "Which copy of each duplicated Message-ID to keep: the first occurrence (default) or the last. The surviving messages stay in their original order either way.",
          "enum": [
            "first",
            "last"
          ],
          "type": "string"
        },
        "mbox": {
          "description": "The mbox archive text to de-duplicate. Messages are delimited by the classic `From ` postmark lines at the start of a line; a single pasted RFC 5322 message (no postmark) is treated as one message. Surviving messages are returned verbatim.",
          "type": "string"
        },
        "no_message_id": {
          "default": "keep",
          "description": "What to do with a message that has no Message-ID header (e.g. drafts): keep every such message (default; distinct ID-less messages are never merged together) or drop them all.",
          "enum": [
            "keep",
            "drop"
          ],
          "type": "string"
        }
      },
      "required": [
        "mbox"
      ],
      "type": "object"
    }
  }
}