なんかこう、携帯電話でE-Mailが普及してからというもの、アドレスがありえないことになってる人が多い気がする。以前
Hxxk.jpさんで紹介されていたような記事とかを見ると、なるほどなあ、なんて思ったりもするわけなんだけど。
で、最近必要に迫られてRFC2821とRFC2822を読んでいたところ、アドレス規定に関して驚いたことが。RFC2822のセクション3.4、Address Specificationに関して。
3.4. Address Specification
Addresses occur in several message header fields to indicate senders and recipients of messages. An address may either be an individual mailbox, or a group of mailboxes.
とあって、
address = mailbox / group
mailbox = name-addr / addr-spec
addr-spec = local-part "@" domain
local-part = dot-atom / quoted-string / obs-local-part
と、この辺までは普通な感じなんだけど、前のセクションに戻ってdot-atomの定義を見てびっくり。
dot-atom = [CFWS] dot-atom-text [CFWS]
dot-atom-text = 1*atext *("." 1*atext)
atext = ALPHA / DIGIT / ; Any character except controls,
"!" / "#" / ; SP, and specials.
"$" / "%" / ; Used for atoms
"&" / "'" /
"*" / "+" /
"-" / "/" /
"=" / "?" /
"^" / "_" /
"`" / "{" /
"|" / "}" /
"~"
とある。1*atext というのは、atext の1回以上の繰り返しを意味する。つまりメールアドレスのlocal-part(@より前の部分)って、"$"とか"%"とかも使い放題なわけだ。全然知らなかった。
.(ドット)の繰り返しが現れるメールアドレスをサーバが受け付けない場合がある、というのは聞く話だけど、$とか%ってホントに受け付けてくれるんだろうか?むしろこっちの方が拒否される気がするなあ。