3 ms·
I think that the domain part of email addresses could be an IP address. Depending on how IPv6 addresses are displayed there, they won’t contain a dot. Somewhat
by claudius 13y ago
I think that the domain part of email addresses could be an IP address. Depending on how IPv6 addresses are displayed there, they won’t contain a dot.
Somewhat artificial, yes.
- MattBearman 13y agoI'll admit I hadn't considered IPv6b addresses, might have to rethink my trusty regex. Sad, it's served me well for so many years.
- sp332 13y agoIPv4 also has a valid decimal representation. http://1249764136/ http://1249764136/ will send you to Google!
- hayksaakian 13y agoTIL. I wonder what the security implications of this is.
- syncsynchalt 13y agoIf using IPs in an email address you are supposed to surround it with square brackets anyway. I wouldn't add IP address support to an email regex because I'd rather turn away such perverse data anyway. Nobody uses IP-based email addresses.
- claudius 13y agoA square bracket, however, is not a dot (which is for what the original regexp checked). And I just tried sending an email to me@[my.ip.addr.[0]]. Postfix somehow recognised it was for this local host, but failed because it wasn’t part of the virtual domains I had put into it. ‘perverse’ seems to be somewhat appropriate. [0] Sorry, too lazy to check the appropriate documentation IP address ranges. 20db?