Why Can't I Use My Modified GMail Address?
July 28, 2006 4:25 PM   Subscribe

Why are so many contact and registration forms kicking back my spamguard-modified GMail address (myaddressas+nameofcompany@gmail) as "invalid?"

It seems pretty clear that the issue is the plus sign. But plus signs are not illegal characters (nonstandard, yes, illegal, no) in address construction, otherwise, the e-mails which are sent to such addresses would be lost in the aether somewhere. Is this just a matter of companies relying on scripts that disallow the + character wholesale, or are they wise to this GMail trick (which could work elsewhere, no?) and actively trying to stop people from using it? (I have caught a company that clearly sold my information using this method, so I'm keen on continuing to use it whenever possible.)
posted by Dreama to Computers & Internet (15 answers total)
 
they're trying to validate that you entered a valid email address, but the idiot who write it doesn't know what that means, so they are disallowing your valid address.
posted by aubilenon at 4:39 PM on July 28, 2006


It's no conspiracy. The regex used to validate the email address doesn't include a +.
posted by sohcahtoa at 4:41 PM on July 28, 2006


Instead, try dropping in a random period somehwere; i.e., "anyone@gmail.com" becomes "any.one@gmail.com". Gmail ignores the period. Then just set up your filter to look for the modified name.
posted by mattholomew at 4:42 PM on July 28, 2006 [2 favorites]


The plus sign is likely to get turned into a space by CGI scripts, that's probably the reason.
posted by AmbroseChapel at 4:44 PM on July 28, 2006


According to the example you've given, there is no .com at the end...

Many webforms check for *@*.* to confirm a valid email address. I do on my website, because I want to hold forum posters accountable as legitimate individuals .. interestingly enough, I need your email address to protect my site (and inferentially, you) from spam.
posted by twiggy at 4:47 PM on July 28, 2006


I suspect they're just looking for alphanumerics (a-Z, 0-9) followed by an @, more alphanumerics, a period, and (depending how smart they are) either three or an unlimited number of alphabet characters. They might consider - and _ an alphanumeric as well, but + is less likely to make the cut.

Like sohcahtoa and subilenon said.
posted by spaceman_spiff at 4:49 PM on July 28, 2006


Hmm, you know what, thanks for posting this, I just wrote a regex to check this sort of stuff for a client, and I *completely* forgot that a "+" was a valid sign... I need to go add that now...
posted by KirTakat at 4:52 PM on July 28, 2006


Yes, it's very common for badly written code not to allow the + sign in email addresses. So common in fact that I've set up my postfix server to use a different more common character for it instead (though I realise you can't do that).

I can't give you a solution, but I can mention that the + to append a tag is very common among mailservers, if little used. If I recall correctly, it started with sendmail. Qmail uses the - character by default for this purpose I think, to avoid the problem you're having.
posted by fvw at 5:25 PM on July 28, 2006


Thanks for the tip about the period (i.e. meta.filter@gmail.com sending to metafilter@gmail.com)...never knew that. Have known about the + trick for some time but it gets caught a lot like OP was asking about.

As for the original question, my personal recommendation is SpamGourmet...check it out
posted by jckll at 5:31 PM on July 28, 2006


Funny thing: GoDaddy's site doesn't allow the plus. I actually alerted them to this fact, and they overtly said they didn't care. I even faxed them a copy of the relevant RFC, and they again said that they didn't care.

That made my brain hurt.
posted by delfuego at 7:05 PM on July 28, 2006


Seriously, creating a function that exactly follows the RFC specs on email addresses is far from trivial. Cal Henderson of Flickr created this beast of a regex:
$addr_spec = '([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c'.
'\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+|\\x22([^\\x0d'.
'\\x22\\x5c\\x80-\\xff]|\\x5c[\\x00-\\x7f])*\\x22)'.
'(\\x2e([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e'.
'\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+|'.
'\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|\\x5c\\x00'.
'-\\x7f)*\\x22))*\\x40([^\\x00-\\x20\\x22\\x28'.
'\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d'.
'\\x7f-\\xff]+|\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff'.
']|\\x5c[\\x00-\\x7f])*\\x5d)(\\x2e([^\\x00-\\x20'.
'\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40'.
'\\x5b-\\x5d\\x7f-\\xff]+|\\x5b([^\\x0d\\x5b-'.
'\\x5d\\x80-\\xff]|\\x5c[\\x00-\\x7f])*\\x5d))*';

posted by matthewr at 7:16 PM on July 28, 2006


When I first learned PHP, in 1999, I couldn't figure out how to use a plus in a regular expression, since it's a special character. The resulting function I used over and over again for years. I finally realized, a couple of years ago, that this was keeping people who use plus-based aliasing (eg, me) from filling out my forms.

I expect a lot of people make that mistake.
posted by waldo at 7:38 PM on July 28, 2006


Abigail's exhaustive Perl email address module.

It is unbelievably complex, because the RFC allows a surprisingly large variety of possibilities.
posted by i_am_joe's_spleen at 8:31 PM on July 28, 2006


Best answer: plus signs are not illegal characters (nonstandard, yes, illegal, no)

They're standard too. The problem is people not reading the standard, and making up what they think it says. Despite there being free off-the-shelf verifiers for this thing.
posted by grouse at 2:59 AM on July 29, 2006


Cold you use &# 43; (with the space removed) instead? Thats the HTML for a + sign.
posted by Orange Goblin at 4:55 AM on July 29, 2006


« Older Jawa dens in LA   |   Do chargers use electricity when they aren't being... Newer »
This thread is closed to new comments.