I want each user to register with a unique email address. However some email addresses like GMail allow you to add a + suffix which could be used to register multiple accounts to a website but it all goes to a single email address e.g.
- bob@gmail.com goes to bob@gmail.com
- bob+1@gmail.com goes to bob@gmail.com
- bob+2@gmail.com goes to bob@gmail.com
- bob+3@gmail.com goes to bob@gmail.com
- bob+4@gmail.com goes to bob@gmail.com
Effectively they can have as many email addresses as they want. This is a problem because my website sees it as 5 separate email addresses but gmail sees it as one email address.
I was thinking of blocking any email addresses with a ‘+’ in, but I don’t want to block any valid email addresses. What is the standard practice?
I don’t think there is a standard practice on how to handle this, other than not allowing + all together. On the other hand, preventing it doesn’t seem to be that useful. It won’t take more than a few minutes to create an entirely new e-mail address on some free service if whoever you’re intending to block-out really needs it.
It should also be noted that a lot of other e-mail providers also provide subaddressing, but not using the plus sign, but with a hyphen (Yahoo, Runbox, etc.), and attempting to block this out will only cause trouble for anybody just having an e-mail address with a hyphen in it. It’s a war that you’ve already lost.
Besides, if you filter out plus signs, you’re essentially not compliant with the RFC3696 standard anymore:
But you could just strip out the plus part if you insist.
The above will give you