# \`levenshtein distance spammer emails\` should flag accounts that are similar even if no accounts have been marked as spammers yet

**URL:** <https://meta.discourse.org/t/levenshtein-distance-spammer-emails-should-flag-accounts-that-are-similar-even-if-no-accounts-have-been-marked-as-spammers-yet/49858>\
**Category:** Feature\
**Created:** [7. September 2016 um 22:10 UTC](https://meta.discourse.org/t/levenshtein-distance-spammer-emails-should-flag-accounts-that-are-similar-even-if-no-accounts-have-been-marked-as-spammers-yet/49858 "2016-09-07T22:10:57Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [7. September 2016 um 22:10 UTC](https://meta.discourse.org/t/levenshtein-distance-spammer-emails-should-flag-accounts-that-are-similar-even-if-no-accounts-have-been-marked-as-spammers-yet/49858/1 "2016-09-07T22:10:58Z")

</div>

**Update:** After detailed discussion, it seems that this setting is working as currently coded - it only checks emails against a list after an account is deleted. As this does not help when a spammer makes many accounts immediatly before spamming the site, this should be updated to check emails against all _recent_ registrations and put users into approval queue if the similarity is too high.

* * *

Working to update spam settings after recent attack at Stonehearth. While cleaning up the damage, we found that someone had made multiple accounts, all with suspiciously similar email addresses. Looking closer, we realized that all the emails are identical, at least as far as Gmail is concerned - but it seems Discourse treated them as different emails. From reading about levenshtein distance on Google, it seems to be a measurement of string simularity. With a default value of 2, I would have assumed these accounts would have been caught, as they only moved the period.

Thoughts?

Emails in question:

```plaintext
q.kzkfkzkwlsh1@gmail.com
qk.zkfkzkwlsh1@gmail.com
qkz.kfkzkwlsh1@gmail.com
qkzk.fkzkwlsh1@gmail.com
qkzkf.kzkwlsh1@gmail.com
qkzkfk.zkwlsh1@gmail.com
qkzkfkz.kwlsh1@gmail.com
qkzkfkzk.wlsh1@gmail.com
qkzkfkzkw.lsh1@gmail.com
qkzkfkzkwl.sh1@gmail.com
qkzkfkzkwls.h1@gmail.com
qkzkfkzkwlsh1@gmail.com

```

---

_[View the full topic](https://meta.discourse.org/t/levenshtein-distance-spammer-emails-should-flag-accounts-that-are-similar-even-if-no-accounts-have-been-marked-as-spammers-yet/49858)._
