Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
address-rfc2821
Advanced tools
Parser for RFC-821/RFC-2821/RFC-5321 (envelope) format email addresses (Mailbox and Path).
This module parses email addresses from the SMTP envelope. These are the portions immediately following the SMTP verbs MAIL FROM:
and RCPT TO:
. RFC-5321 email addesses look like this:
<> // null
<Postmaster>
<from@example.com>
<to@example.com>
<dot.atom.string@example.com>
<"quoted string"@example.com>
angle-brackets-optional@example.com
To parse email addresses contained in the message headers (To: From: BCC, CC), look instead at an RFC 2822/5322 parser such as address-rfc2822 or email-addresses.
npm install address-rfc2821
const Address = require('address-rfc2821').Address;
const parsed = new Address('<user@example.com>');
The Address object is an interface to reading email addresses passed in at SMTP time. It parses all the formats in RFC-2821 and 2822, as well as UTF8 email addresses according to the RFCs 5890, 5891 and 5892 providing the domain in punycode when encountered It also supports correctly escaping email addresses.
Create a new address object for user@host
Creates a new address object by parsing the email address. Will throw an exception if the address cannot be parsed.
Access the local part of the email address
Access the domain part of the email address, decoded if necessary to punycode
Access the domain part of the email address, unencoded and case preserved
Provides the email address in the appropriate <user@host>
format. And
deals correctly with the null sender and local names.
If use_punycode = true, uses address.host instead of address.original_host.
Same as format().
Provides the email address in 'user@host' format.
If use_punycode = true, uses address.host instead of address.original_host.
This module is MIT licensed.
FAQs
RFC-5321 (Envelope) email address parser
The npm package address-rfc2821 receives a total of 13,078 weekly downloads. As such, address-rfc2821 popularity was classified as popular.
We found that address-rfc2821 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.