Checking if email is valid

avi.e.gross at gmail.com avi.e.gross at gmail.com
Thu Nov 2 00:18:56 EDT 2023


Yes, it would be nice if there was a syntax for sending a test message sort
of like an ACK that is not delivered to the recipient but merely results in
some status being sent back such as DELIVERABLE or NO SUCH USER or even
MAILBOX FULL.

An issue with the discussion that may be worth considering is that some
email addresses are not always valid or may not be valid yet but will be
activated later. If I plan on opening a business unit which DNS will later
support as specific.category.mycompany.com.au and we first want to write
some code and test it and roll everything out later, then a test for
user at specific.category.mycompany.com.au could fail some tests now but may be
fine later. Or what if I turn my machine off on weekends and when it boots,
it sets up to be able to receive mail. Is the address only sometimes valid?

We cannot be sure what rules may change and for all we know, they will
select other UNICODE symbols to replace @ for use by countries not having an
@ on keyboards in the local language or support some syntax like {AT} to be
usable ...

I even wonder about a service along the lines of tinyurl where you register
a potentially long or complex or hard to type name and get a short readable
one instead that is just used to provide a re-direct  or even changed
periodically to dynamically point to where you want them now, such for the
current day of the week. I can easily imagine them making a funny looking
email address such as user at TINYqwerty that may not pas your current test or
one that looks valid to you but maps into an invalid or even null address.

BTW, checking if an email is valid is much wider as a concept than whether
the email address looks like a possible address. A big check sometimes made
if if the headers in the message and various formatting issues look
reasonable or issues about attachments and even if it is passed by SPAM
detectors. This discussion is just about if an email address LOOKS possibly
valid or should not be accepted.

I note earlier iterations of email had addressed like
mach1!mach2!mach3!ihnp4!mach5!mach6!user or even mach1!mach2!user at mach3 and
I remember tools that analyzed what other machines various machines claimed
to have a direct connection to and tried to figure out a connection from
your source to destination, perhaps a shorter one or maybe a less expensive
one. Hence machines like ihnp4 and various universities that were densely
connected to others got lots of traffic. In that scenario, validity had
another meaning. 

-----Original Message-----
From: Python-list <python-list-bounces+avi.e.gross=gmail.com at python.org> On
Behalf Of D'Arcy Cain via Python-list
Sent: Wednesday, November 1, 2023 9:57 PM
To: python-list at python.org
Subject: Re: Checking if email is valid

On 2023-11-01 17:17, Chris Angelico via Python-list wrote:
> On Thu, 2 Nov 2023 at 08:09, Grant Edwards via Python-list
> <python-list at python.org> wrote:
>> Make sure it has an '@' in it.  Possibly require at least one '.'
>> after the '@'.
> 
> No guarantee that there'll be a dot after the at. (Technically there's
> no guarantee of an at sign either, but email addresses without at
> signs are local-only, so in many contexts, you can assume there needs
> to be an at.)

druid!darcy - doesn't work any more but not because it is syntactically 
incorrect.

Remember the good old days when we were able to test if an address 
existed without sending?  That was before the black hats discovered the 
Internet.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy at Vex.Net
VoIP: sip:darcy at Vex.Net

-- 
https://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list