Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
reserved-email-addresses-list
Advanced tools
List of 1250+ email addresses, admin usernames, and mailer daemon usernames reserved for security concerns. Made for Forward Email <https//forwardemail.net>.
List of 1250+ email addresses, admin usernames, and mailer daemon usernames reserved for security concerns. Made for Forward Email.
npm:
npm install reserved-email-addresses-list email-addresses
The string you are comparing with must be converted to lowercase and trimmed of whitespace. The reason we are converting to lowercase is because the dictionary of words we are comparing with are all lowercase, and in order to compare for strict equality, we must have matching case.
It is also highly recommended that you check for strict equality, and for a list of admin-related and mailer-daemon usernames, you should check for strict equality, starts with, or ends with comparisons as well.
const reservedEmailAddressesList = require('reserved-email-addresses-list');
const reservedAdminList = require('reserved-email-addresses-list/admin-list.json');
const emailAddresses = require('email-addresses');
const email = '"Admin***!!!"@example.com';
const parsed = emailAddresses.parseOneAddress(email);
if (parsed === null) throw new Error('Email was not a valid address');
const str = parsed.local.toLowerCase();
let reservedMatch = reservedEmailAddressesList.find(addr => addr === str);
if (!reservedMatch)
reservedMatch = reservedAdminList.find(
addr => addr === str || str.startsWith(addr) || str.endsWith(addr)
);
if (reservedMatch)
throw new Error(
'User must be a domain admin to create an alias with a reserved word (see https://forwardemail.net/reserved-email-addresses).'
);
The default list index.json itself comes in a few different formats. The default import is an Array
, but also available are a Map
and Set
version of the list.
// Array version
const reservedEmailAddressesList = require('reserved-email-addresses-list');
// Also available with: require('reserved-email-addresses-list/array');
// Map version
const reservedEmailAddressesMap = require('reserved-email-addresses-list/map');
// Set version
const reservedEmailAddressesSet = require('reserved-email-addresses-list/set');
If you would like to create a Map or Set version of the other lists, simply require them first, and then convert to a Set
or Map
(see map.cjs, set.cjs, and other files in this repo for more insight how to do this).
Name | Website |
---|---|
Nick Baugh | http://niftylettuce.com/ |
FAQs
List of 1250+ generic, admin, mailer-daemon, and no-reply usernames reserved for security concerns. Made for Forward Email <https//forwardemail.net>.
The npm package reserved-email-addresses-list receives a total of 279 weekly downloads. As such, reserved-email-addresses-list popularity was classified as not popular.
We found that reserved-email-addresses-list demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.