TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How do you normalize emails (such as removing + form a Gmail id)?

1 点作者 ghoshbishakh9 个月前
People are creating duplicate accounts in our service using the same email id such as:<p>example@gmail.com<p>Example@gmail.com<p>e.x.ample@gmail.com<p>example+anyrandomstring@gmail.com<p>How do we normalize this?<p>Is there a good resource which at least lists all this email provider specific rules about how email addresses are treated?

2 条评论

solardev9 个月前
Are there really that many rules in the wild?<p>I think generally if you strip periods for Gmails (but not for Microsoft accounts), truncate anything after a plus, and go all lowercase, it should normalize enough.<p>e.g.<p>eX.am.Ple+anyThing@gmail.com<p>becomes example@gmail.com<p>Technically the user part of email addresses can be case-sensitive, but I&#x27;ve never seen a real-world example of that.<p>The plus sign (plus addressing) is usually a vendor-added feature, but I think it&#x27;s generally safe to truncate. (Your users might get annoyed though, because they might be using that to separate different accounts)<p>The period thing is provider-specific too. Gmail just ignores them, but Microsoft treats them as distinct accounts. Yahoo might too. You can&#x27;t always tell when a third-party domain is hosted on one of those (unless you want to do a mxlookup for every address).<p>Maybe instead of outright blocking similar-looking emails, you can do some other ID verification on those (require a credit card, one of the id verify services, or just have them manually email you for processing, etc.). e.g. &quot;Did you mean _______? Your email address is similar. If you forgot your password, blah blah. If that isn&#x27;t you, please send our support team a message.&quot;
ctrlGsysop9 个月前
Sounds like it’s a freemium so increase ads or add an interstitial ad. Perhaps you could force social logins only. Or the Cloudflare wall may help. You haven’t really defined your problem here but I assume you perceive value is being stolen by their methods.