Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Long email addresses are false negatives #13

Closed
bradvogel opened this issue Dec 28, 2015 · 7 comments
Closed

Long email addresses are false negatives #13

bradvogel opened this issue Dec 28, 2015 · 7 comments
Assignees

Comments

@bradvogel
Copy link

Why are long auto-reply email addresses flagged as not being an email? These are very common. The two addresses below are from auto-generated Github and Asana emails:

brad: nodemailertest npm install isemail
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
[email protected] node_modules/isemail
brad: nodemailertest node
> var Isemail = require('isemail');
undefined
> Isemail.validate('reply+000c89caea14b0bf53caf17fd0c9c67fce378f51fd1af05492cf000000011292f3d892a169ce07601530@reply.github.com')
false
> Isemail.validate('2.76502047696709.12649470900136.76502049898901.4mtgutesvvbpnqn5wzg13g81kw8cn7xk4wz6nffte6jyjb7hx8@mail.asana.com')
false
> 



@bradvogel
Copy link
Author

This is an important issue because of the reliance on this library by the very popular Nodemailer (https://github.com/andris9/Nodemailer) library. So it's very common for these email addresses to be encountered. See https://github.com/andris9/smtp-connection/issues/32

@gergoerdosi
Copy link
Contributor

They are flagged because the local part is too long. RFC 5321 allows only 64 octets:

http://tools.ietf.org/html/rfc5321#section-4.5.3.1.1

@bradvogel
Copy link
Author

Ok, thanks. Is there a way to configure this library to ignore that specific part of the RFC?

@skeggse
Copy link
Owner

skeggse commented Dec 29, 2015

Unfortunately, that particular violation of 5321 assigns the email address a relatively high errorLevel, where higher values are worse infractions. This is because the email address is technically invalid per SMTP (as described in RFC 5321), and some parts of the email infrastructure may be unable to accommodate the email address. The only currently implemented method of ignoring errors is by a threshold for errorLevel, and since this violation is at such a large value, it's impossible to specifically allow this.

In this case, I don't know there's a lot we can do because Nodemailer shouldn't really allow sending emails with email addresses that might not make it through SMTP nodes. I'd recommend reaching out to GitHub and Asana directly.

@bradvogel
Copy link
Author

Thanks @skeggse @gergoerdosi . Makes sense. I'll talk to the maintainer of nodemailer and see if we can work out a bypass.

@skeggse
Copy link
Owner

skeggse commented Dec 29, 2015

If you have a better idea for error handling, I'm all ears.

@skeggse skeggse self-assigned this Mar 23, 2018
@skeggse
Copy link
Owner

skeggse commented Mar 23, 2018

This should be addressed in 4.0.0, either via #162 or #4.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants