• Stars
    star
    144
  • Rank 255,590 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

List of 1250+ generic, admin, mailer-daemon, and no-reply usernames reserved for security concerns. Made for @forwardemail.

reserved-email-addresses-list

build status code style styled with prettier made with lass license npm downloads

List of 1250+ generic, admin, mailer-daemon, and no-reply usernames reserved for security concerns. Made for Forward Email.

Table of Contents

Install

npm:

npm install reserved-email-addresses-list email-addresses

Usage

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, mailer-daemon, and no-reply 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).'
  );

Lists

Formats

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).

References

Contributors

Name Website
Nick Baugh http://niftylettuce.com/

License

MIT Β© Nick Baugh

More Repositories

1

email-templates

Create, preview (browser/iOS Simulator), and send custom email templates for Node.js. Made for @forwardemail, @ladjs, @cabinjs, @spamscanner, and @breejs.
JavaScript
3,594
star
2

free-email-forwarding

The best free email forwarding for custom domains. Visit our website to get started (SMTP server)
JavaScript
2,370
star
3

forwardemail.net

Privacy-focused encrypted email for everyone.
JavaScript
663
star
4

test-preview-emails-cross-browsers-ios-simulator-nodejs-javascript

Automatically opens your browser and iOS Simulator to preview Node.js email messages sent with Nodemailer. Made for @forwardemail and @ladjs. Cross-browser and cross-platform email testing.
JavaScript
196
star
5

font-awesome-assets

πŸ’„ Convert any of @FortAwesome's Font-Awesome icons to an asset, such as an <svg> tag or a Base64-encoded PNG/SVG <img> tag! It supports Retina devices and custom tag attributes too!
HTML
130
star
6

custom-fonts-in-emails

An extremely easy way to use custom fonts in emails without having to use art software.
JavaScript
119
star
7

nodejs-dns-over-https-tangerine

Node.js DNS over HTTPS - 🍊 Tangerine is the best drop-in replacement for dns.promises.Resolver using DNS over HTTPS ("DoH") via undici with built-in retries, timeouts, smart server rotation, AbortControllers, and caching support for multiple backends (with TTL and purge support). Made for @forwardemail.
JavaScript
107
star
8

nodemailer-base64-to-s3

⚑ Convert your Base64-Encoded Data URI's in `<img>` tags to Amazon S3/CloudFront URL's. A better alternative than embedding images with CID using Nodemailer.
JavaScript
30
star
9

status.forwardemail.net

Status Page
Markdown
13
star
10

get-fqdn

Lookup the fully qualified domain name ("FQDN") of the current server's IP (default) or a custom IP. 90x faster than `hostname -f` and works with Node v6.4+.
JavaScript
6
star
11

authheaders

Node.js wrapper around the Python pip package authheaders exposing a function to generate Authentication-Results headers
JavaScript
5
star
12

python-spfcheck2

Node.js wrapper around Python's spf.check2 function which conforms to both RFC4408 and RFC7208
JavaScript
5
star
13

browser-extension

The best privacy-focused browser extension with one-click disposable addresses, unlimited email aliases, and access to your Forward Email account.
3
star
14

dkimpy

Node.js wrapper around the Python pip package dkimpy exposing DKIM and ARC signing and verification functions
JavaScript
2
star
15

python-dkim-verify

Node.js wrapper around Python's dkim.verify function which conforms to RFC spec
JavaScript
2
star
16

python-arf

Node.js wrapper around the Python package arf, which is a processor for Abuse Reporting Format (ARF) messages.
JavaScript
2
star
17

authentication-headers

Our independently maintained fork of @adam-iris authentication-headers repo which contains a fix in the Python package "authheaders".
Python
1
star
18

mta-sts.forwardemail.net

HTML
1
star