smtp-address-parser

Parse an SMTP (RFC-5321) address

MIT 10 个版本
安装
npm install smtp-address-parser
yarn add smtp-address-parser
pnpm add smtp-address-parser
bun add smtp-address-parser
README

smtp-address-parser

Parse an SMTP (RFC-5321) address.

Some notes

** Changes in version 1.1.0: **

** Domains are now checked beyond RFC-5321 syntax only **

Domain names must be fully qualified; that is with at least two labels. The top-level domain must have at least two octets.

** Length limitations are now checked **

Total length limit of an address is 986 octets; based on a 1,000 octet SMTP line length.

See https://tools.ietf.org/html/rfc1035 section 2.3.4. Size limits:

Domain names are limited to 255 octets, when encoded with a length byte before each label, and including the top-level zero length label. So, the effctive limit with interstitial dots is 253 octets.

Labels within a domain name are limited to 63 octets.

The above are limits of the DNS protocol, not any particular implementation.

RFC-5321 section 4.5.3.1. “Size Limits and Minimums” still says:

“To the maximum extent possible, implementation techniques that impose no limits on the length of these objects should be used.”

版本列表
1.1.0 2024-06-26
1.0.10 2022-01-28
1.0.8 2021-11-23
1.0.7 2021-09-29
1.0.6 2021-09-01
1.0.4 2021-08-02
1.0.3 2021-03-19
1.0.2 2021-03-13
1.0.1 2021-03-13
1.0.0 2021-03-13