Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"If truth is beauty, how come no one has their hair done in the library?" -- Lily Tomlin


devel / comp.lang.python / Re: Checking if email is valid

SubjectAuthor
* Re: Checking if email is validSimon Connah
`* Re: Checking if email is validJon Ribbens
 +- Re: Checking if email is validChris Angelico
 `- Re: Checking if email is validSimon Connah

1
Re: Checking if email is valid

<mailman.119.1698907394.3828.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=28707&group=comp.lang.python#28707

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: simon.n.connah@protonmail.com (Simon Connah)
Newsgroups: comp.lang.python
Subject: Re: Checking if email is valid
Date: Thu, 02 Nov 2023 06:42:57 +0000
Lines: 94
Message-ID: <mailman.119.1698907394.3828.python-list@python.org>
References: <nze9mu-VI8ExA3VA9RA07qMo9Oj03xuWoTe-FL6N_AbOGK0QC6LdqaeKq-OvcrilFYqqT5tc9LsvSqHRKDYMGaBXzlVzyOdX9Ae0Xp_ACtg=@protonmail.com>
<6542be44.050a0220.e7b44.2143@mx.google.com>
<r0NlTIlUyGCuaJjYT9d6E0PpLUzMUXrBTPnWdkUZ13sbrMnvfkhSInG9BiYBsfa4yZjfxX8BLVyQRRtp8OkMFAatApkbr4T5tU3F7OX-aVM=@protonmail.com>
Mime-Version: 1.0
Content-Type: multipart/signed; protocol="application/pgp-signature";
micalg=pgp-sha512;
boundary="------0c8954922dfd1f58f9cab6b6b2fe0bc66b484d427034e761fdff5f1469729fc5";
charset=utf-8
X-Trace: news.uni-berlin.de AbWzetq2JLwHW/E3CNpyMQ9OcQ7aKXYSEpzdpOsoY/kw==
Cancel-Lock: sha1:AgfNmVe36vrmFBdGSPQ302lPyFs= sha256:rrBWhpn+fbuBiAKEd08aJ4vp5QnjJU6f/4NxtTvlk0o=
Return-Path: <simon.n.connah@protonmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=protonmail.com header.i=@protonmail.com header.b=JvTUB/ON;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.010
X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'content-
type:multipart/signed': 0.05; 'please?': 0.07; 'string': 0.07;
'tests': 0.07; 'cc:addr:python-list': 0.09; 'content-
type:application/pgp-signature': 0.09; 'filename:fname piece:asc':
0.09; 'filename:fname piece:signature': 0.09;
'filename:fname:signature.asc': 0.09; 'originally': 0.09; 'regex':
0.09; 'cc:no real name:2**0': 0.14; 'conforms': 0.16; 'content-
disposition:attachment; filename="signature.asc"': 0.16;
'corresponds': 0.16; 'ok.': 0.16; 'simon': 0.16; 'sounds': 0.16;
'wrote:': 0.16; 'it?': 0.19; 'round': 0.19; 'cc:addr:python.org':
0.20; "i've": 0.22; 'basically': 0.22; 'idea': 0.24; 'anything':
0.25; 'cc:2**0': 0.25; 'party': 0.26; 'received:185.70': 0.26;
'received:protonmail.ch': 0.26; 'looked': 0.31; 'message-
id:@protonmail.com': 0.32; 'python-list': 0.32;
'received:185.70.40': 0.32; 'but': 0.32; "i'm": 0.33; 'server':
0.33; 'someone': 0.34; 'able': 0.34; 'header:In-Reply-To:1': 0.34;
'trying': 0.35; 'invalid': 0.35; 'question.': 0.35; 'received:ch':
0.35; 'possibly': 0.36; 'using': 0.37; "it's": 0.37; 'could':
0.38; 'least': 0.39; 'valid': 0.39; 'services.': 0.39; 'define':
0.40; 'difficult': 0.40; 'want': 0.40; 'e-mail,': 0.61; 'e-mail':
0.61; 'me.': 0.62; 'here': 0.62; 'email': 0.63; 'send': 0.63;
'your': 0.64; 'required': 0.65; 'bad': 0.67; 'right': 0.68;
'content-type:multipart/mixed': 0.68; 'received:185': 0.71;
"you'll": 0.73; 'bear': 0.76; 'reply': 0.77; 'unit': 0.81;
'header:Received:2': 0.84; 'wasting': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
s=protonmail3; t=1698907391; x=1699166591;
bh=rbTwtu4Xhjq2jgfhxJ/GXhnzMZL6cq6LIFXibPPOaT4=;
h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
Message-ID:BIMI-Selector;
b=JvTUB/ONaSxsxV3C8wJfhvi6iG0iJCnT3UdbyhoYeLg6ai/29GX4yYwOv1gPHOWZU
PRumdVOWIUVsZmyU3HTQP3nCnciymRVqEEDRIh766mU9Im8tN428CH0LSLkH2e7Kbj
gmQBScHAdxPOMJN7D7WjVWS6kj69B10y6bFGnpfKcbfjyGYk1emBTvcBZP5I6wdsox
VV0rN3qJF+4CjLQ4+V1oi5SP09SbuT0ZBREpKdHfe7A/Z9fs8VlIZiOrvqBd8+zPk3
8n5046iaWW+iYwPYMGDnHAzxSPCy0jSO/6QegUzf/FCjWc8Uj94jmiAuTsVQdPw6Sg
vV9BjR8K5mWxQ==
In-Reply-To: <6542be44.050a0220.e7b44.2143@mx.google.com>
Feedback-ID: 24074989:user:proton
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <r0NlTIlUyGCuaJjYT9d6E0PpLUzMUXrBTPnWdkUZ13sbrMnvfkhSInG9BiYBsfa4yZjfxX8BLVyQRRtp8OkMFAatApkbr4T5tU3F7OX-aVM=@protonmail.com>
X-Mailman-Original-References: <nze9mu-VI8ExA3VA9RA07qMo9Oj03xuWoTe-FL6N_AbOGK0QC6LdqaeKq-OvcrilFYqqT5tc9LsvSqHRKDYMGaBXzlVzyOdX9Ae0Xp_ACtg=@protonmail.com>
<6542be44.050a0220.e7b44.2143@mx.google.com>
 by: Simon Connah - Thu, 2 Nov 2023 06:42 UTC
Attachments: "signature.asc" (application/pgp-signature)

>

> On 2023-11-01, Simon Connah via Python-list python-list@python.org wrote:
>

> > I'm building a simple project using smtplib and have a
> > question. I've been doing unit testing but I'm not sure how to check
> > if an email message is valid.
>

>

> Send an e-mail using it? If the right person gets the e-mail, then
> it's valid?
>

> > Using regex sounds like a bad idea to me and the other options I
> > found required paying for third party services.
> >

> > Could someone push me in the right direction please? I just want to
> > find out if a string is a valid email address.
>

OK. It is going to take me some time to get round to every reply here so please bear with me.

Basically I'm writing unit tests and one of them passess in a string with an invalid email address. I need to be able to check the string to see if it is a valid email so that the unit test passess.

>

> You'll have to define "valid". Valid syntactically according to
> <what>? Will be accepted by an SMTP server somewhere? Corresponds to
>

> a real person?
>

> Make sure it has an '@' in it. Possibly require at least one '.'
> after the '@'.
>

> Trying to do anything more than that is just wasting your time and
> annoying the mule.
>

Valid as in conforms to the standard. Although having looked at the standard that might be more difficult than originally planned.

Simon.

Attachments: "signature.asc" (application/pgp-signature)
Re: Checking if email is valid

<slrnuk73qr.73m.jon+usenet@raven.unequivocal.eu>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=28722&group=comp.lang.python#28722

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jon+usenet@unequivocal.eu (Jon Ribbens)
Newsgroups: comp.lang.python
Subject: Re: Checking if email is valid
Date: Thu, 2 Nov 2023 12:00:27 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <slrnuk73qr.73m.jon+usenet@raven.unequivocal.eu>
References: <nze9mu-VI8ExA3VA9RA07qMo9Oj03xuWoTe-FL6N_AbOGK0QC6LdqaeKq-OvcrilFYqqT5tc9LsvSqHRKDYMGaBXzlVzyOdX9Ae0Xp_ACtg=@protonmail.com>
<6542be44.050a0220.e7b44.2143@mx.google.com>
<r0NlTIlUyGCuaJjYT9d6E0PpLUzMUXrBTPnWdkUZ13sbrMnvfkhSInG9BiYBsfa4yZjfxX8BLVyQRRtp8OkMFAatApkbr4T5tU3F7OX-aVM=@protonmail.com>
<mailman.119.1698907394.3828.python-list@python.org>
Injection-Date: Thu, 2 Nov 2023 12:00:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3a36a2147de4923162ca047d447245e2";
logging-data="2300016"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4IA7REnTu7Ktj2i45jPOv6yVq09Cg528="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:ahYd3qNl883yClIRA6XhQreRTiQ=
 by: Jon Ribbens - Thu, 2 Nov 2023 12:00 UTC

On 2023-11-02, Simon Connah <simon.n.connah@protonmail.com> wrote:
> Valid as in conforms to the standard. Although having looked at the
> standard that might be more difficult than originally planned.

Yes. Almost nobody actually implements "the standard" as in RFC 2822
section 3.4.1 (which can contain, for example, non-printable control
characters, and comments), nor is it particularly clear that they
should. So while checking against "the spec" might sound right, it's
highly unlikely that it's what you actually want. Would you really
want to allow:

(jam today) "chris @ \"home\""@ (Chris's host.)public.example

for example? And would you be able to do anything with it if you did?

Re: Checking if email is valid

<mailman.140.1698972305.3828.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=28739&group=comp.lang.python#28739

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder2.eternal-september.org!eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: rosuav@gmail.com (Chris Angelico)
Newsgroups: comp.lang.python
Subject: Re: Checking if email is valid
Date: Fri, 3 Nov 2023 11:44:50 +1100
Lines: 30
Message-ID: <mailman.140.1698972305.3828.python-list@python.org>
References: <nze9mu-VI8ExA3VA9RA07qMo9Oj03xuWoTe-FL6N_AbOGK0QC6LdqaeKq-OvcrilFYqqT5tc9LsvSqHRKDYMGaBXzlVzyOdX9Ae0Xp_ACtg=@protonmail.com>
<6542be44.050a0220.e7b44.2143@mx.google.com>
<r0NlTIlUyGCuaJjYT9d6E0PpLUzMUXrBTPnWdkUZ13sbrMnvfkhSInG9BiYBsfa4yZjfxX8BLVyQRRtp8OkMFAatApkbr4T5tU3F7OX-aVM=@protonmail.com>
<mailman.119.1698907394.3828.python-list@python.org>
<slrnuk73qr.73m.jon+usenet@raven.unequivocal.eu>
<CAPTjJmpPrLsQHJJdZxWpodocDXLrPVzr8OJH5oFGaq_geH3uOA@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de UQGhIGP1MhOYt+6ffkaapg9lKA6DiqxqBNjYDgcUTfNQ==
Cancel-Lock: sha1:U2EbszQ3y7LAOa1JhGHFNqXPKcQ= sha256:qVbFNfHCrzT8p42Rv8Jkh3tWQxfYj9GXD5SZH2r7C2c=
Return-Path: <rosuav@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=P2/mmRFw;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.008
X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; '(which': 0.04; '2023':
0.07; 'characters,': 0.09; 'comment,': 0.09; 'originally': 0.09;
'received:mail-lj1-x22f.google.com': 0.09; 'rfc': 0.09; 'yes.':
0.09; 'chrisa': 0.16; 'conforms': 0.16; 'from:addr:rosuav': 0.16;
'from:name:chris angelico': 0.16; 'implements': 0.16; 'mandates':
0.16; 'simon': 0.16; 'spec': 0.16; 'spec"': 0.16; 'unlikely':
0.16; 'violation': 0.16; 'yesterday,': 0.16; 'wrote:': 0.16;
'to:addr:python-list': 0.20; 'fri,': 0.22; 'code': 0.23;
'anything': 0.25; 'section': 0.25; 'seems': 0.26; "isn't": 0.27;
'example,': 0.28; 'looked': 0.31; 'python-list': 0.32; 'right,':
0.32; 'message-id:@mail.gmail.com': 0.32; 'but': 0.32; "i'm":
0.33; 'server': 0.33; 'able': 0.34; 'mean': 0.34; 'header:In-
Reply-To:1': 0.34; 'received:google.com': 0.34; '"the': 0.35;
'fine': 0.35; 'particularly': 0.35; 'from:addr:gmail.com': 0.35;
'really': 0.37; "it's": 0.37; 'could': 0.38; 'enough': 0.39;
'valid': 0.39; 'still': 0.40; 'difficult': 0.40; 'want': 0.40;
'should': 0.40; 'today': 0.61; 'me.': 0.62; 'day,': 0.62; 'email':
0.63; 'clear': 0.64; 'day.': 0.68; 'highly': 0.78; 'jon': 0.84;
'that!': 0.84; 'want.': 0.84; 'tomorrow,': 0.91; 'line,': 0.93;
'magic': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1698972302; x=1699577102; darn=python.org;
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
:from:to:cc:subject:date:message-id:reply-to;
bh=UoFVWu4dx0tBE+HsW37BXUT5ojEGWdGQglxhM2p4+cU=;
b=P2/mmRFwHaq8/MNH8g3Ghk7UhaHmBz7ERknNBxjQZ8pLTz8QUeYR60TGFbX3r5Nc5R
ljCnduZ6LKGQl34AzREE9Cjed9vz1LYfn4LkyvMxWzDoXFVSwLnqSRKBONVl/CrkRHjg
CGr1NQoNpwaD7NoKZyxt+eQkpxao9ku6pQ1Bad90y+PiaKBVFbhU9MwqZ6HKPFgxCbZ8
qErcVOgbQg2VeF/ovpPCHyKbkFwGsdIEkGtMSRdP25n1svt5C464V6MEKxjGZ49HMKqi
d7Oi0xKVh3FGGBcQfyB5sa5YpvJFUCLUkylJ8kk3keUFc06L9TLgm8JR+WrzIIuPVjeP
GrUQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1698972302; x=1699577102;
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=UoFVWu4dx0tBE+HsW37BXUT5ojEGWdGQglxhM2p4+cU=;
b=W3KvpRbS2Ag8Ne90kpcmwY47Iy3WVdG1RVmTPDL/e4w3ikblTNTu52/uHkPMDFVRcn
wNeiLv/FAVA1LYjfgtF83j6TGADM+ZdCEh0ySjIo1Gj67N6WtPYSuK2J80eCT42bHgsL
csdU5+6mdyvqfKLAkGv18NIeOJEtAhWuLicETB/diihltW0Fevl++6jZqa1WJ96BIek4
SJuKLqF1PEZYFmspzDKnfyHrsPeej7g91KQhMpaoXFNOFtuRcnd1QQaik0LUvKY3ifpN
B45h0N33X+k72MKIqETQbv79fz4VWT53xcVDrUapLDXgPKTFGsXlfW1CJH6zGyEou5IE
HyRw==
X-Gm-Message-State: AOJu0YzLqDE3KjKoao/I0cxZRAHWJ785Rhxc5yMH2Typ0tPQ68WjgRdj
DdvaE52N1GmYf8zm7co4v99wQ2Q8NLnbrFlBV6dQ6xaZ
X-Google-Smtp-Source: AGHT+IHeMGHukNVTmjK2Vc6JoTPC6TsryOSQKQmENGgBpnIvqSrhCQuGL1WJEIJnMbN6ap8G44XxQHa3DsKjUt4d/QE=
X-Received: by 2002:a05:651c:336:b0:2c5:15dc:ba99 with SMTP id
b22-20020a05651c033600b002c515dcba99mr13386016ljp.51.1698972301764; Thu, 02
Nov 2023 17:45:01 -0700 (PDT)
In-Reply-To: <slrnuk73qr.73m.jon+usenet@raven.unequivocal.eu>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAPTjJmpPrLsQHJJdZxWpodocDXLrPVzr8OJH5oFGaq_geH3uOA@mail.gmail.com>
X-Mailman-Original-References: <nze9mu-VI8ExA3VA9RA07qMo9Oj03xuWoTe-FL6N_AbOGK0QC6LdqaeKq-OvcrilFYqqT5tc9LsvSqHRKDYMGaBXzlVzyOdX9Ae0Xp_ACtg=@protonmail.com>
<6542be44.050a0220.e7b44.2143@mx.google.com>
<r0NlTIlUyGCuaJjYT9d6E0PpLUzMUXrBTPnWdkUZ13sbrMnvfkhSInG9BiYBsfa4yZjfxX8BLVyQRRtp8OkMFAatApkbr4T5tU3F7OX-aVM=@protonmail.com>
<mailman.119.1698907394.3828.python-list@python.org>
<slrnuk73qr.73m.jon+usenet@raven.unequivocal.eu>
 by: Chris Angelico - Fri, 3 Nov 2023 00:44 UTC

On Fri, 3 Nov 2023 at 07:17, Jon Ribbens via Python-list
<python-list@python.org> wrote:
>
> On 2023-11-02, Simon Connah <simon.n.connah@protonmail.com> wrote:
> > Valid as in conforms to the standard. Although having looked at the
> > standard that might be more difficult than originally planned.
>
> Yes. Almost nobody actually implements "the standard" as in RFC 2822
> section 3.4.1 (which can contain, for example, non-printable control
> characters, and comments), nor is it particularly clear that they
> should. So while checking against "the spec" might sound right, it's
> highly unlikely that it's what you actually want. Would you really
> want to allow:
>
> (jam today) "chris @ \"home\""@ (Chris's host.)public.example
>
> for example? And would you be able to do anything with it if you did?

If by checking against the spec you mean "sending an email to it with
a code or magic link", then.... sure, allow that! It's still short
enough to fit on one line, even. Seems fine to me.

Of course, since that one is in the .example TLD, it's not actually
going to succeed, but now I'm curious whether you could craft a mail
server that mandates the Queen's rule of "jam tomorrow, jam yesterday,
but never jam today". That part is technically a comment, but it's a
clear violation of a royal decree, so that should cause the email to
bounce. It's jam every OTHER day, and today isn't any OTHER day.

ChrisA

Re: Checking if email is valid

<mailman.150.1699088513.3828.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=28752&group=comp.lang.python#28752

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder2.eternal-september.org!eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: simon.n.connah@protonmail.com (Simon Connah)
Newsgroups: comp.lang.python
Subject: Re: Checking if email is valid
Date: Sat, 04 Nov 2023 09:01:32 +0000
Lines: 65
Message-ID: <mailman.150.1699088513.3828.python-list@python.org>
References: <nze9mu-VI8ExA3VA9RA07qMo9Oj03xuWoTe-FL6N_AbOGK0QC6LdqaeKq-OvcrilFYqqT5tc9LsvSqHRKDYMGaBXzlVzyOdX9Ae0Xp_ACtg=@protonmail.com>
<6542be44.050a0220.e7b44.2143@mx.google.com>
<r0NlTIlUyGCuaJjYT9d6E0PpLUzMUXrBTPnWdkUZ13sbrMnvfkhSInG9BiYBsfa4yZjfxX8BLVyQRRtp8OkMFAatApkbr4T5tU3F7OX-aVM=@protonmail.com>
<mailman.119.1698907394.3828.python-list@python.org>
<slrnuk73qr.73m.jon+usenet@raven.unequivocal.eu>
<eeH_mNE0MtAxZfvNbS8VLVcEWHJJ5vYa31eX7uR8XwqQyj7RSZ9tNrsp2UhJYXE0tMmAWtAzrfdvYPaA93QrCGADj7__RVXPvtSsiUWO-7E=@protonmail.com>
Mime-Version: 1.0
Content-Type: multipart/signed; protocol="application/pgp-signature";
micalg=pgp-sha512;
boundary="------03ae91033ffd6e80b8df890d124b922766472707ed6d16715e93adff90946109";
charset=utf-8
X-Trace: news.uni-berlin.de krbtVEsrV4vtWjOxZZ+4kAcb2HUsK0RhRm4R0Ycz2U2A==
Cancel-Lock: sha1:ReDb+BfbId6NywT11XtjbIuaEyE= sha256:cKutbIPIa315GtuSTn1Kc9gZZQQ3Wz/c+2Uv5CbxmBg=
Return-Path: <simon.n.connah@protonmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=protonmail.com header.i=@protonmail.com header.b=yY2dhABi;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.002
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(which': 0.04; 'content-
type:multipart/signed': 0.05; 'cc:addr:python-list': 0.09;
'characters,': 0.09; 'content-type:application/pgp-signature':
0.09; 'filename:fname piece:asc': 0.09; 'filename:fname
piece:signature': 0.09; 'filename:fname:signature.asc': 0.09;
'originally': 0.09; 'rfc': 0.09; 'yes.': 0.09; 'cc:no real
name:2**0': 0.14; 'conforms': 0.16; 'content-
disposition:attachment; filename="signature.asc"': 0.16;
'implements': 0.16; 'simon': 0.16; 'spec"': 0.16; 'unlikely':
0.16; 'wrote:': 0.16; 'cc:addr:python.org': 0.20; 'maybe': 0.22;
'anything': 0.25; 'section': 0.25; 'cc:2**0': 0.25; 'tried': 0.26;
'received:185.70': 0.26; 'received:protonmail.ch': 0.26;
'example,': 0.28; 'looked': 0.31; 'message-id:@protonmail.com':
0.32; 'received:185.70.40': 0.32; 'right,': 0.32; "i'm": 0.33;
'able': 0.34; 'header:In-Reply-To:1': 0.34; '"the': 0.35;
'particularly': 0.35; 'received:ch': 0.35; 'really': 0.37; "it's":
0.37; 'valid': 0.39; 'use': 0.39; 'difficult': 0.40; 'want': 0.40;
'email': 0.63; 'clear': 0.64; 'content-type:multipart/mixed':
0.68; 'interesting': 0.71; 'received:185': 0.71; 'highly': 0.78;
'header:Received:2': 0.84; 'want.': 0.84; 'broke': 0.91
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
s=protonmail3; t=1699088503; x=1699347703;
bh=hbSJSFG1p6Sk7o4PfjPM5ozKkW//po6YxnfYPxFMj5Q=;
h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
Message-ID:BIMI-Selector;
b=yY2dhABieNxwwRVAA4NFGA7iKmbKZOyreSAgZOQ4wLvaH2LoYix8eYBKTypaFJSlC
B1iAciSdP4kyYFolrPA02VosiCXwbNrMVEaOfyG2fvX+Mu6CDlndSRnP9ehlwdDkGz
S4KxuQwdUlJhY6S+mY1VUyepUug7KaB2tULdNezCFbseEWmfl1glAycPLP1URqMG3O
3/7p6nesgF71hjn4xpSabuTm08RLTM2D1VpCeuMe2+UHgWXcx/f52/Ltf4tjTC+N18
NAZ5TL+meQXGNCoBEGT5FXgakIPScnOO5cT30Auo2aJZOIafTOTb3FzrUrEG5H/G2S
bJX3dQttP0OIQ==
In-Reply-To: <slrnuk73qr.73m.jon+usenet@raven.unequivocal.eu>
Feedback-ID: 24074989:user:proton
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <eeH_mNE0MtAxZfvNbS8VLVcEWHJJ5vYa31eX7uR8XwqQyj7RSZ9tNrsp2UhJYXE0tMmAWtAzrfdvYPaA93QrCGADj7__RVXPvtSsiUWO-7E=@protonmail.com>
X-Mailman-Original-References: <nze9mu-VI8ExA3VA9RA07qMo9Oj03xuWoTe-FL6N_AbOGK0QC6LdqaeKq-OvcrilFYqqT5tc9LsvSqHRKDYMGaBXzlVzyOdX9Ae0Xp_ACtg=@protonmail.com>
<6542be44.050a0220.e7b44.2143@mx.google.com>
<r0NlTIlUyGCuaJjYT9d6E0PpLUzMUXrBTPnWdkUZ13sbrMnvfkhSInG9BiYBsfa4yZjfxX8BLVyQRRtp8OkMFAatApkbr4T5tU3F7OX-aVM=@protonmail.com>
<mailman.119.1698907394.3828.python-list@python.org>
<slrnuk73qr.73m.jon+usenet@raven.unequivocal.eu>
 by: Simon Connah - Sat, 4 Nov 2023 09:01 UTC
Attachments: "signature.asc" (application/pgp-signature)

>

>

> On 2023-11-02, Simon Connah simon.n.connah@protonmail.com wrote:
>

> > Valid as in conforms to the standard. Although having looked at the
> > standard that might be more difficult than originally planned.
>

>

> Yes. Almost nobody actually implements "the standard" as in RFC 2822
> section 3.4.1 (which can contain, for example, non-printable control
> characters, and comments), nor is it particularly clear that they
> should. So while checking against "the spec" might sound right, it's
> highly unlikely that it's what you actually want. Would you really
> want to allow:
>

> (jam today) "chris @ \"home\""@ (Chris's host.)public.example
>

> for example? And would you be able to do anything with it if you did?

As I said in another post it would be interesting to see what broke when you tried to use an esoteric email address in the wild. Maybe when I'm bored :D.

Simon.

Attachments: "signature.asc" (application/pgp-signature)

devel / comp.lang.python / Re: Checking if email is valid

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor