Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a normalisation function to match email addresses #6

Closed
jace opened this issue Oct 12, 2017 · 0 comments
Closed

Provide a normalisation function to match email addresses #6

jace opened this issue Oct 12, 2017 · 0 comments

Comments

@jace
Copy link
Owner

jace commented Oct 12, 2017

The following email addresses all point to the same mailbox:

  1. example@gmail.com
  2. example@googlemail.com
  3. example+extra@gmail.com
  4. exam.ple@gmail.com

There are use cases for "normalising" email addresses to confirm two different strings point to the same mailbox (see hasgeek/lastuser#221 for example). mxsniff should provide a normalisation function that:

  1. Lowercases the domain portion. (The mailbox portion's case must be preserved as per RFC 5321. Lowercasing it for the purpose of indexing should be a downstream concern.)
  2. Strips + suffixes from the mailbox portion.

A custom normalisation function for the google-gmail provider does additional processing:

  1. Replaces @googlemail.com with @gmail.com
  2. Strips . (periods) from the address

mxsniff will default to the standard normalisation function if a provider doesn't specify a custom function. Combined with #5, this can be used to normalise an email address without a DNS lookup, using just the domain to guess.

@jace jace changed the title Provide a normalisation function to match email address Provide a normalisation function to match email addresses Oct 12, 2017
@jace jace closed this as completed in a773c02 Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant