2019-10-05

There Are Surprising Restrictions to Pluses and Dots In Gmail Addresses

The internet has many resources (one, two, three) that mention that for receiving emails to your gmail address...
  • Everything after plus sign (+) is ignored.
  • Dots/periods (.) are ignored
  • Example: e.x.a.m.p.l.e+asdf_1234@gmail.com will deliver to example@gmail.com
Note: many websites do not accept email addresses that include a plus sign (+), and I think basically all websites accept dots before the @.

There seems to be some restrictions on dots that are not discussed very much...
  • Dots can not be consecutive; "e..xample@gmail.com" is not usable.
  • Dot can not be the first character; ".example@gmail.com" is not usable.
  • Dot can not be the last character; "example.@gmail.com" is not usable.
  • The above dot restrictions apply even after a plus sign; "example+a..b@gmail.com" is not usable.


For example@gmail.com, I believe e.x.a.m.p.l.e@gmail.com is the maximum allowed adding of dots, and you can remove any subset of these dots as well.  These restrictions mean that if there are x characters in the local-part (stuff before the @) in your plain email address, then you only have 2^(x-1) possible dot-based variations. The example@gmail.com plain address has 2^(7-1) = 64 dot-based variations.

If you're serious about supplying unique emails to each website/service, then there are advantages to your email being long enough so that 2^(x-1) gives you enough possible variations for websites/services that do not allow plus signs.

Sidenote about account security and privacy: If you're using strong, unique passwords for your accounts, then I think account recovery becomes a potential weak link in the security of your account.  It's relatively easy for someone to try to initiate account recovery for your account (or at the least see if you have an account somewhere) if you use an email like example@gmail.com, but it gets harder if you used an email like example+SomeSite_123654@gmail.com.  Unique email aliases also help you track why you are receiving an email, who is selling your email to spammers, and blocking those spammers by blocking the specific email alias they are sending to.

As best as I can tell, these dot restrictions come from the standard for email addresses, and are not particular to gmail.   The Wikipedia article section on the local-part of an email address (the stuff before the @ symbol) has a list of allowed characters, including...

dot ., provided that it is not the first or last character unless quoted, and provided also that it does not appear consecutively unless quoted (e.g. John..Doe@example.com is not allowed but "John..Doe"@example.com is allowed)
Note: In my own experiments, I was not able to use quoting to send to email addresses that contained consecutive dots.

When composing an email in the gmail web interface, it will refuse to send to email addresses that violate the dot restrictions:
gmail web interface refuses to send to a gmail address that is undeliverable due to violating dot restrictions.
Other email providers (ex: Yahoo) will let you send to a gmail address that violates the dot restrictions, but delivery of that email will fail, and after a while you will probably get a mailer-daemon email notifying you of the delivery failure.

Also of note is that the official email spec says that letters, digits, and all of the following characters are allowed in the local-part of an email address:
! # $ % & ' * + - / = ?  ^ _ ` . { | } ~

Unfortunately, many of these characters are not accepted by lots of websites/services.



No comments:

Post a Comment