Is this a valid address?
08:04:33.934 C: MAIL
FROM:<github.agent:.github-hookshot/7431eee(_at_)winserver(_dot_)com>
08:04:34.712 S: 250 2.1.0 Ok
with the ':' and also '/' ??
No. The / is fine, but : is a special, and has to be quoted to be used in a
local part. RFC 5322 section 3.2.3.
It appears to be accepted by various servers, including my own.
Our server doesn't allow it.
This is related to a new project of handling a GitHub Webhook HTTP
notifications sent to my web server. The handler will the payload as
a local message using the address:
From: github agent: github-hookshot/7431eee
That comes from an operator defined macro:
From: github agent: {GITHUB-AGENT}
Which is read from the JSON payload.
If the setup happens to send the notification to an email address,
then the mail is exported for SMTP to sent out.
So I need to know if the address is valid. Its hard to decipher
whether it is or not from the RFC5322/RFC5321 BNF. It seems to read
the ':' and '/' characters are valid.
addr-spec = local-part "@" domain
local-part = dot-atom / quoted-string / obs-local-part
dot-atom = [CFWS] dot-atom-text [CFWS]
dot-atom-text = 1*atext *("." 1*atext)
atext = ALPHA / DIGIT / ; Printable US-ASCII
"!" / "#" / ; characters not including
"$" / "%" / ; specials. Used for atoms.
"&" / "'" /
"*" / "+" /
"-" / "/" /
"=" / "?" /
"^" / "_" /
"`" / "{" /
"|" / "}" /
"~"
Note tha absence of ":" in atext. The only way a ":" in a local-part
is within a quoted-string:
quoted-string = [CFWS]
DQUOTE *([FWS] qcontent) [FWS] DQUOTE
[CFWS]
qcontent = qtext / quoted-pair
qtext = %d33 / ; Printable US-ASCII
%d35-91 / ; characters not including
%d93-126 / ; "\" or the quote character
obs-qtext
Ned
_______________________________________________
ietf-smtp mailing list
ietf-smtp(_at_)ietf(_dot_)org
https://www.ietf.org/mailman/listinfo/ietf-smtp