PDA

View Full Version : Multi-dotted email addresses


Snowhog
05-26-2012, 04:23 PM
Many spammers use email addresses that contain multiple periods. These are almost always spammers registered as such on BotScout.com or stopforumspam.com.

Examples of those that have registered on our forurm (and that we banned). Domain after the @ removed for this posting:

d.ikl.itlo.n.gce.t@
di.kl.it.l.o.ngc.e.t@
pr.u.d.e.n.t.i.ak.jug@
pru.d.e.nt.i.a.k.ju.g@
me.garer.er.t@
d.i.klit.l.o.n.g.ce.t@
d.ikli.t.l.o.n.g.cet@
p.ru.d.en.tia.k.jug@
pr.u.d.e.nt.i.akjug@
p.rude.ntiakj.ug@
pru.de.n.t.ia.kjug@

Has anyone developed a MOD to recognize these multi-dotted email address provided at time of registration so that they can be deleted automatically?

Andreas
05-26-2012, 05:37 PM
If they are listed @ stopforumspam.com, why don't you use their blocklists?

Apart from that, yes I've developed a tool which checks all registration attempts against various rules and denies them if there is a match.

But this was solely developed for internal use and will not be released, sorry.

kh99
05-26-2012, 06:26 PM
Has anyone developed a MOD to recognize these multi-dotted email address provided at time of registration so that they can be deleted automatically?


You could do something like this: create a new plugin using hook userdata_start and this code:

$this->validfields['email'][VF_CODE] = '
$max_dots = 1;
if ($retval = $dm->verify_useremail($data))
{
$parts = explode("@", $data);
if (is_array($parts) && substr_count($parts[0], ".") > $max_dots)
{
$dm->error("bademail");
$retval = false;
}
}
return $retval;
';


It only checks the part before the '@', so set $max_dots to the number of dots you will allow (I think one dot in an email name probably isn't unusual, but that's up to you). Also, this uses the default 'bademail' phrase, but if you'd rather have a special error messages for "too many dots" you can create a phrase and use the varname in place of 'bademail'.



...But this was loely developed for internal use and will not be releases, sorry.

Oh well...thanks for letting us know. :)

Snowhog
05-26-2012, 08:11 PM
Thank you. I've created the plugin and activated it. We'll see how effective it is. If we stop seeing new registrations with multi-dotted email address's, I'll be happy as a clam.

As to the plugin "uses the default 'bademail' phrase"; where is this phrase located? One of the hardest things about working with vBulletin is learning just where things are!

kh99
05-26-2012, 08:16 PM
Go to Languages & Phrases > Search in Phrases, search for bademail and click the "Phrase Variable Name Only" radio button.

If you want to create a different message, go to Phrase Manager > Add New Phrase, and choose "Error Messages" for the phrase type. Whatever you choose for varname, that's what you'd want to put in place of bademail in the plugin code.

Snowhog
05-26-2012, 08:55 PM
Thank you.

Okay, so I located Error Messages Phrases Containing 'bademail' per your instructions. When I click the Edit button, if I wanted to change the existing text (You entered an invalid email address.), would I click the Copy Default Text button, change the text to what I want, and click Save? Is it as simple as that?

kh99
05-26-2012, 09:21 PM
Yes, that should do it.

Snowhog
05-26-2012, 10:19 PM
Okay. Thank you for your assistance. Most appreciated.

--------------- Added 1338094434 at 1338094434 ---------------

After creating this plugin, I logged out and attempted to register using a multi-dotted email address. The plugin works! Registration was thwarted.

This is going to reduce the workload on our Administrators. Kudos and thank you for the plugin code.

John Lester
05-27-2012, 08:31 PM
Kevin you rock! This is such an outstandingly simple way to prevent a ton of spammers :) Thank you.

Disco_Stu
05-28-2012, 12:13 AM
Not all emails with more than one dot are spam. My primary email account is through Time Warner's Road Runner service and it has the format of "name@city.rr.com"

kh99
05-28-2012, 12:23 AM
Not all emails with more than one dot are spam. My primary email account is through Time Warner's Road Runner service and it has the format of "name@city.rr.com"

Well, this code only checks the name part. But even so, I think it's true that there will be some valid email addresses with more than one dot in the name part. I guess the idea is that that will be pretty rare compared to spammer email addresses.

Boofo
05-28-2012, 12:37 AM
You could always add a bademail message that states if you think this is wrong, please contact the Admin at wherever.

Snowhog
05-28-2012, 01:17 AM
Well, this code only checks the name part. But even so, I think it's true that there will be some valid email addresses with more than one dot in the name part. I guess the idea is that that will be pretty rare compared to spammer email addresses.
I can accept that 'two' dots could be used in the name part of an email, if one was using their full name, including the middle initial:

joe.d.smith@email.com

as an example. So, one would just need to modify:

$max_dots = 1;

to

$max_dots = 2;

and good to go.

The point of my original question and observation, is that spammers use email addresses with multiple periods; more than two; in them.

kh99
05-28-2012, 01:22 AM
lol, I suppose we should continue this discussion in the *mod thread*: https://vborg.vbsupport.ru/showthread.php?t=283540

I really don't mind if someone wanted to release a mod with this idea (it wasn't my idea in the first place), but I was hoping for a little more than copying my post verbatim. :(

Snowhog
05-28-2012, 01:38 AM
lol, I suppose we should continue this discussion in the *mod thread*: https://vborg.vbsupport.ru/showthread.php?t=283540

I really don't mind if someone wanted to release a mod with this idea (it wasn't my idea in the first place), but I was hoping for a little more than copying my post verbatim. :(

Hehe.

My question and your code, along with the discussion that ensued, has the potential of being incorporated into a really useful plugin or a MOD. If a MOD, the commentary about being able to specify what characters and how many to check for would be wonderful.

kh99
05-28-2012, 01:52 AM
I posted some code in that other thread to handle multiple characters (I hope - I didn't test it).

You know, I'm not even sure that there isn't something like this out there already. I didn't do a search at all.

cloferba
05-28-2012, 10:50 AM
lol, I suppose we should continue this discussion in the *mod thread*: https://vborg.vbsupport.ru/showthread.php?t=283540

I really don't mind if someone wanted to release a mod with this idea (it wasn't my idea in the first place), but I was hoping for a little more than copying my post verbatim. :(

Well, I consider this important so it is better to have your code as a modification and not in a single reply. Feel free to improve it ;)

kh99
05-28-2012, 11:19 AM
Well, I consider this important so it is better to have your code as a modification and not in a single reply. Feel free to improve it ;)

Yeah, it's OK, truth is I probably would never have gotten around to it, and you did mark it reusable. It's just that it really should at least be a product and have the "max_dots" as a setting.