記事1
RFC 5322 & 5321に沿ったメールアドレス(local-part)のテストデータを考えてみた
https://qiita.com/yoshitake_1201/items/40268332cd23f67c504c
記事として詳細に記述している。
記事2
テストで失敗しないための忘備録
https://qiita.com/BlueEventHorizon/items/75a24ba0c7e912b7df2b
試験で使うメールアドレスの例を記載している。
RFC 5321 Simple Mail Transfer Protocol, OCTOBER 2008
Updated by: RFC 7504
RFC 7504 SMTP 521 and 556 Reply Codes, JUNE 2015
https://www.rfc-editor.org/rfc/rfc7504.txt
RFC 5322 Internet Message Format, OCTOBER 2008
Updated by:RFC 6854
RFC 6854 Update to Internet Message Format to Allow Group Syntax in the "From:" and "Sender:" Header Fields, MARCH 2013
https://www.rfc-editor.org/rfc/rfc6854.txt
atext = ALPHA / DIGIT / ; Printable US-ASCII
"!" / "#" / ; characters not including
"$" / "%" / ; specials. Used for atoms.
"&" / "'" /
"*" / "+" /
"-" / "/" /
"=" / "?" /
"^" / "_" /
"`" / "{" /
"|" / "}" /
"~"
使える文字の種類を定義。
dot-atom-text = 1*atext *("." 1*atext)
「.」の前には必ず1文字以上のatextが必要。
「.」の後ろには必ず1文字以上のatextが必要。
そのため、記事1でドット「.」について
先頭と末尾以外、かつ連続しなければ使える(末尾=@の直前)
という記述とほぼ同等。
なお、ALPH, DIGITは
RFC 5234 Augmented BNF for Syntax Specifications: ABNF 2008
https://www.rfc-editor.org/rfc/rfc5234.txt
で定義している。
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
DIGIT = %x30-39 ; 0-9
最後までおよみいただきありがとうございました。
いいね 💚、フォローをお願いします。
Thank you very much for reading to the last sentence.
Please press the like icon 💚 and follow me for your happy life.