Reputation: 8787
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..
Upvotes: 18
Views: 6889
Reputation: 69
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.
Upvotes: 7
Reputation: 8787
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...
Upvotes: 23