Email mailbox validate
email-mailbox-validate · version 1.0.0 · Communications · free, no key needed
Check one RFC 5322 mailbox for syntax only and return a stable reason code.
Use when you need to: validate rfc 5322 mailbox syntax · check one mailbox grammar only · mailbox syntax reason without dns.
Decide before calling
Read the versioned contract and the supported scope below. Reuse email-mailbox-validate@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use email-mailbox-validate@1.0.0 for validate rfc 5322 mailbox syntax. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- validate rfc 5322 mailbox syntax
- check one mailbox grammar only
- mailbox syntax reason without dns
- reject obsolete mailbox phrase dots
- is this single mailbox syntactically valid
- detect unclosed mailbox quotes
- בדיקת תחביר של תיבת דואר
Not supported
- return the display-name word list
- claim the address exists or can receive mail
- validate SPF DKIM or DMARC
- validate a comma-separated address list
Behavior
- Well-typed mailbox text that fails RFC 5322 syntax returns {valid:false, reason}. It does not throw. Wrong types, unknown fields, lone surrogates, and declared limits throw. The grammar matches email-mailbox-parse: phrase words, dot-atom, quoted-string, comments, and domain-literals; obsolete dots in a display name are invalid_display_name.
- A valid result returns form and canonical text using the same canonical quoting as the parser. utf8 defaults to false. true selects RFC 6532 UTF-8 scalars without normalization. No DNS lookup and no deliverability claim.
- reason is one of: non_ascii, invalid_local_part, invalid_domain, invalid_domain_literal, invalid_display_name, invalid_quoted_string, invalid_comment, obsolete_route, not_a_single_mailbox, unclosed_quote, unclosed_comment, unclosed_domain_literal, unclosed_angle, invalid_quoted_pair, trailing_junk.
Input
mailbox(string, required): min length 1; max length 256utf8(boolean, optional)
Output
valid(boolean, required)reason(one of "non_ascii", "invalid_local_part", "invalid_domain", "invalid_domain_literal", "invalid_display_name", "invalid_quoted_string", "invalid_comment", "obsolete_route", "not_a_single_mailbox", "unclosed_quote", "unclosed_comment", "unclosed_domain_literal", "unclosed_angle", "invalid_quoted_pair", "trailing_junk", optional)form(one of "addr-spec", "name-addr", optional)canonical(string, optional): min length 3; max length 1600
Limits
- max mailbox bytes: 256
- max local part chars: 64
- max domain chars: 190
- max display words: 8
- max word chars: 64
- max comment depth: 4
- max comments: 8
- max output bytes: 2048
Example
Request input:
{
"mailbox": "Who? <one@y.test>"
}
Response:
{
"result": {
"valid": true,
"form": "name-addr",
"canonical": "Who? <one@y.test>"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "email-mailbox-validate",
"version": "1.0.0",
"input": {
"mailbox": "Who? <one@y.test>"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/email-mailbox-validate/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"mailbox":"Who? <one@y.test>"}'
The machine-readable contract is at /v1/tools/email-mailbox-validate/versions/1.0.0.
CLI
node cli.mjs run email-mailbox-validate 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Email address list validate: Check RFC 5322 address-list syntax, including dots, quotes, comments, and groups.
- Email address list parse: Parse an RFC 5322 address-list into ordered mailboxes, groups, and a canonical form.
- Email address list deduplicate: Drop duplicate mailboxes in an RFC 5322 address-list, keeping the first one.
- Email address list format: Format mailboxes and groups as one deterministic RFC 5322 address-list.
- Email mailbox format: Render a canonical RFC 5322 mailbox from decoded parts, without a delivery claim.
- Email mailbox parse: Parse one RFC 5322 mailbox into parts and canonical text, without a delivery claim.