Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are comments allowed in email address domain part?

Tags:

email

smtp

Comments are allowed in email address local part - for example cat(veryangry)[email protected], but is it possible to add comments in email domain part like - catlives@(veryangry)inmyhouse.com? Will SMTP servers accept that?

Just tried on POSTFIX - email comments are rejected even in email local part... In domain part accepted, but I think those comments are not recognized (or POSTFIX email filter is not so strict).

Revising my SMTP server email filter.. Now all email comments are removed, but if message is relayed - it is unclear if they should be also sent. It could be that many SMTP servers will not accept such email.. Trying to find some info in RFCs..

like image 955
Ernestas Gruodis Avatar asked Jul 26 '14 16:07

Ernestas Gruodis


People also ask

Is it possible to add comments in email domain part?

Comments are allowed in email address local part - for example cat (veryangry)[email protected], but is it possible to add comments in email domain part like - catlives@ (veryangry)inmyhouse.com? Will SMTP servers accept that? Just tried on POSTFIX - email comments are rejected even in email local part...

Are comments allowed in the domain and the local part?

Comments are allowed in the domain as well as in the local-part; for example, john.smith@ (comment)example.com and [email protected] (comment) are equivalent to [email protected] .

What is the domain part of an email address?

The domain name part of an email address has to conform to strict guidelines: it must match the requirements for a hostname, consisting of letters, digits, hyphens and dots. In addition, the domain part may be an IP address literal, surrounded by square braces, such as jsmith@ [192.168.2.1], although this is rarely seen except in email spam.

How many characters are allowed in an e-mail address?

The format of e-mail address is: local-part@domain-part(max. 64@255 characters, no more 256 in total). The local-partand domain-partcould have different set of permitted characters, but that's not all, as there are more rules to it. In general, the local part can have these ASCII characters: lowercase Latin letters: abcdefghijklmnopqrstuvwxyz,


2 Answers

Crazy, but it's legal, from RFC2822 (from chapter: A.5. White space, comments, and other oddities):

From: Pete(A wonderful \) chap) <pete(his account)@silly.test(his host)>

..The above example is aesthetically displeasing, but perfectly legal...

like image 173
Ernestas Gruodis Avatar answered Oct 06 '22 01:10

Ernestas Gruodis


actually, comments are allowed, whereas I have to add that - generally speaking - the comment itself should be either at the end or at the beginning of each part:

(comment)[email protected]
local.part(comment)@domain.part.tld
local.part@(comment)domain.part.tld 
[email protected](comment)

I think, if there is a comment inbetween it should be surrounded by ' " ' + dots:

local."(comment)"[email protected]

as special characters like "(" must be in ' "'.

There is a great summary on wikipedia with references. https://en.wikipedia.org/wiki/Email_address

Whereas for me, the questions is left whether the comment can span the whole local part.

like image 29
Veronika Franz Avatar answered Oct 05 '22 23:10

Veronika Franz