{"id":"email-address-list-deduplicate","version":"1.0.0","description":"Drop duplicate mailboxes in an RFC 5322 address-list, keeping the first one.","supported_operations":["deduplicate an rfc 5322 address list","remove duplicate mailboxes and keep the first","unique addr-spec list that preserves groups","collapse repeated recipients in a to header","dedupe an address list by local-part and domain","first occurrence mailbox deduplication"],"unsupported_operations":["fold the local-part to lowercase","parse a CSV of recipients","merge two headers that are not already one address-list"],"semantics":["Dot-atom-text is 1*atext *(\".\" 1*atext) per RFC 5322 section 3.2.3, used by section 3.4.1. U+002E is not atext. A leading dot, a trailing dot, or two dots in a row is rejected in a local-part and in a domain, in both ascii and utf-8 modes. Inside a domain-literal or a quoted-string, a dot is ordinary text.","Two mailboxes match when their decoded local-parts are identical and, for a dot-atom domain, their ASCII A-Z letters fold to lowercase. Domain-literals do not fold. The first display name wins. Order is the order of first occurrence.","Members are deduped inside each group. A later group whose canonical text matches an earlier group is dropped. A mailbox inside a group does not collide with a top-level mailbox.","Obsolete null list slots and source routes (obs-route) are rejected. Domain-literals are not interpreted as IP addresses. RFC 5321 length limits and the SMTP requirement for a dot in the domain are not applied.","The same text and mode always remove the same mailboxes. No clock, locale, or network.","Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity."],"limits":{"max_input_bytes":2048,"max_addresses":32,"max_groups":32,"max_comment_depth":8,"max_output_bytes":65536},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["text","mode"],"properties":{"text":{"type":"string","minLength":1,"maxLength":2048},"mode":{"type":"string","enum":["ascii","utf-8"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["mode","canonical","address_count","mailbox_count","group_count","input_mailbox_count","removed_count","addresses"],"properties":{"mode":{"type":"string","enum":["ascii","utf-8"]},"canonical":{"type":"string","minLength":1,"maxLength":8192},"address_count":{"type":"integer","minimum":1,"maximum":32},"mailbox_count":{"type":"integer","minimum":0,"maximum":32},"group_count":{"type":"integer","minimum":0,"maximum":32},"input_mailbox_count":{"type":"integer","minimum":0,"maximum":32},"removed_count":{"type":"integer","minimum":0,"maximum":32},"addresses":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"type":"object","additionalProperties":false,"required":["kind","display_name","local_part","domain","addr_spec"],"properties":{"kind":{"const":"mailbox"},"display_name":{"type":"string","maxLength":2048},"local_part":{"type":"string","maxLength":2048},"domain":{"type":"string","minLength":1,"maxLength":2048},"addr_spec":{"type":"string","minLength":1,"maxLength":8192}}},{"type":"object","additionalProperties":false,"required":["kind","display_name","members"],"properties":{"kind":{"const":"group"},"display_name":{"type":"string","minLength":1,"maxLength":2048},"members":{"type":"array","maxItems":32,"items":{"type":"object","additionalProperties":false,"required":["kind","display_name","local_part","domain","addr_spec"],"properties":{"kind":{"const":"mailbox"},"display_name":{"type":"string","maxLength":2048},"local_part":{"type":"string","maxLength":2048},"domain":{"type":"string","minLength":1,"maxLength":2048},"addr_spec":{"type":"string","minLength":1,"maxLength":8192}}}}}}]}}}},"examples":[{"input":{"text":"A@Ex.COM, A@ex.com, a@ex.com","mode":"ascii"},"output":{"mode":"ascii","canonical":"A@Ex.COM, a@ex.com","address_count":2,"mailbox_count":2,"group_count":0,"input_mailbox_count":3,"removed_count":1,"addresses":[{"kind":"mailbox","display_name":"","local_part":"A","domain":"Ex.COM","addr_spec":"A@Ex.COM"},{"kind":"mailbox","display_name":"","local_part":"a","domain":"ex.com","addr_spec":"a@ex.com"}]}},{"input":{"text":"John Doe <jdoe@machine.example>","mode":"ascii"},"output":{"mode":"ascii","canonical":"John Doe <jdoe@machine.example>","address_count":1,"mailbox_count":1,"group_count":0,"input_mailbox_count":1,"removed_count":0,"addresses":[{"kind":"mailbox","display_name":"John Doe","local_part":"jdoe","domain":"machine.example","addr_spec":"jdoe@machine.example"}]}}],"execute_url":"/v1/tools/email-address-list-deduplicate/versions/1.0.0/execute"}