M BUZZ CRAZE NEWS
// general

Email ID with dash at the end of local part

By Joseph Russell

Is it a valid email if the email has a dash (-) at the end of local part of an email? For example,

Or to generalize, can any of these characters (Characters !#$%&'*+-/=?^_``{|}~ (ASCII: 33, 35-39, 42, 43, 45, 47, 61, 63, 94-96, 123-126)), which are valid to be in local part of the email at the beginning and/or end of the email id?

Google says it is invalid, so for the time being I assume it as invalid too, though RFC excludes only [dot] character from starting with and/or ending local part.

GMail Error for the above case

Note: I'm not concerned about the domain part, because that become more involved due to the way DNS, which complicates the question and answers.

5

2 Answers

Is it a valid email if the email has a dash (-) at the end of local part of an email? [...] Google says it is invalid, so for the time being I assume it as invalid too, though RFC excludes only [dot] character from starting with and/or ending local part.

It's valid. You're only seeing it rejected by Google because it performs a completely different check – they have their own policies on what the local-part can be, as do many other providers.


Google, or anyone else, would be obligated to accept all possibly valid email addresses only if the form was actually asking for an existing, valid email address (possibly from provider). For example, it would be an error if Gmail's To:/Cc: field rejected a valid address.

But the field you highlighted doesn't ask you for an existing email address; it asks for an account name on Google systems, which will be the basis for an email address only once the account has been created. There is nothing that would forbid Google, or anyone else, from limiting the set of valid account names (or, really, even mailbox names) on their own system.

Or, in other words, defining the allowed characters for 'local-part' only means that mail applications SMTP servers must accept such addresses in RFC 822 headers and SMTP commands – but it doesn't say anything about being able to create such mailboxes. (Indeed, back when the early email RFCs were written and most mailboxes were still tied to OS-level accounts, their names had similar or even stricter limits.)

For example, this part of RFC 5321 (section 4.1.2, below ABNFs) explicitly says that a receiving host is allowed to and indeed should have much stricter limits on how its own mailboxes are named:

While the above definition for Local-part is relatively permissive, for maximum interoperability, a host that expects to receive mail SHOULD avoid defining mailboxes where the Local-part requires (or uses) the Quoted-string form or where the Local-part is case-sensitive.

So, although is valid syntactically, that alone doesn't mean that Google must allow you to create it.

13

G Suite (formally Google Apps for Your Domain) does allow hyphens (dashes) within email addresses, even as the last character.

Usernames can contain letters (a-z), numbers (0-9), dashes (-), underscores (_), apostrophes ('), and periods (.).

Source: Name and password guidelines

As you noted, Gmail does not allow hyphens in email addresses.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy