@@ 0,0 1,54 @@
SPDX-FileCopyrightText: 2022 Moritz Poldrack
This package is intended to help reduce multiple sign-ups using the same
mail-address by applying general and provider specific rules to email
addresses, thereby transforming them into a standardised form.
With this `John.Doe+marketing@GoogleMail.com` becomes `firstname.lastname@example.org`. As
these addresses are both for the same mail account, there is risk in this
method. The following transformations can be applied based on the address'
- Remove characters (for example the `.` in Gmail-Addresses)
- Remove subaddresses (usually the part after the +)
- Rewrite domains (`googlemail.com` → `gmail.com`)
- make localpart and domain lowercase (`JohnDoe@…` → `johndoe@…`)
## Missing rules
If you know about more rules, please [open an
or [send it via
## Important notes
***Do not*** send mails to the normalised addresses! Always use the
user-provided address as things like subaddresses and receiver-side sieves can
affect deliverability. Just because `email@example.com` and `firstname.lastname@example.org`
belong to the same account, does not mean that they are equal.
This library can not detect server side settings. If the subaddress delimiter
is set to `-`, this library will still assume it's `+`. There is simply no way
to do that. This may – though highly unlikely – lead to non-functional
addresses being produced. The low likelyhood of this happening to two users on
the same domain with the same odd address (`joe+doe@…` and `joe+deere@…`) makes
this something considered acceptably rare. Again: *do not send mails to
## Stable version
This library is considered stable and considered feature-complete. The only
planned updates are updating or adding rules. To avoid creating a new tag at
every commit, no tags will be added to this repository and origin/HEAD should
be considered stable.