Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"Just the facts, Ma'am" -- Joe Friday


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

SubjectAuthor
o Re: Checking if email is validChris Angelico

1
Re: Checking if email is valid

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

  copy mid

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

  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: Thu, 2 Nov 2023 08:55:27 +1100
Lines: 35
Message-ID: <mailman.112.1698875741.3828.python-list@python.org>
References: <nze9mu-VI8ExA3VA9RA07qMo9Oj03xuWoTe-FL6N_AbOGK0QC6LdqaeKq-OvcrilFYqqT5tc9LsvSqHRKDYMGaBXzlVzyOdX9Ae0Xp_ACtg=@protonmail.com>
<6542be44.050a0220.e7b44.2143@mx.google.com>
<CAPTjJmp6nTDSApa4iYtDu72ZQTrR97wEchQ6fkJExktHZgLLvA@mail.gmail.com>
<6542c833.920a0220.6922f.1485@mx.google.com>
<CAPTjJmpNyOQMEog2aw-mN=izpf9eM8qKUYMsZyc-FAbaey3=UA@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de QruhjAalIzNoS+NrpO5zCAcuJOUTTx+lBTGEeu/Xa59Q==
Cancel-Lock: sha1:Ovl95oQ6w2Eq35xuxeb/jQiQY2Y= sha256:dOCQliJEwCyjSAu4YKydH7cHv5bI6f1mUlAr9ndZE0I=
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=MojiXn5F;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.045
X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; '2023': 0.07; 'angelico':
0.09; 'depend': 0.09; 'regex': 0.09; 'chrisa': 0.16;
'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16;
'received:mail-lj1-x235.google.com': 0.16; 'wrote:': 0.16;
'grant': 0.17; 'addresses': 0.19; "aren't": 0.19; 'thu,': 0.19;
'to:addr:python-list': 0.20; 'local': 0.27; 'chris': 0.28;
'think': 0.32; 'assume': 0.32; 'python-list': 0.32; 'message-
id:@mail.gmail.com': 0.32; 'unless': 0.32; 'but': 0.32; 'there':
0.33; 'server': 0.33; 'header:In-Reply-To:1': 0.34;
'received:google.com': 0.34; 'from:addr:gmail.com': 0.35;
'possibly': 0.36; 'least': 0.39; 'valid': 0.39; 'exact': 0.40;
'match': 0.40; 'want': 0.40; "there's": 0.61; 'days': 0.62;
'email': 0.63; 'send': 0.63; 'guarantee': 0.76; 'domain': 0.77;
'forgot': 0.84; 'signs': 0.84; "that'll": 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1698875738; x=1699480538; 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=5rUcnmcQTljaWyrIAWXTBQidCdkDxcBIFpchRJBAU9A=;
b=MojiXn5FqL0Ry2l8+F2EA3pHHmQ/mXnJjYQ6218BkH3NXOdxtZ5vWcsOGTEn0qkmHb
wDIeDHdyq7ntv3JJBCDf9PUPPy5y8Br1QN6C/qM2rtHviP1Vs1OlNcHeHmskPR39cedp
52CMxz3QX19ZYiovZhmC0jonBqUd0spyCBreOctWBGm0Sq6cBsSovepWijfrzvrdrPM6
RkLLOsspsa5V/d6ZZ4pbj2zgJfRlVjC56jo0zRwo3SFbubHF26O1mjNwrifUr5kGJOeU
hDfzGL7iBafamFllnMCYFMRScZnLS2tZh6/qP0BrUahGA5EIhQFSsdXbjSnaJG+4Uytv
XPjA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1698875738; x=1699480538;
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=5rUcnmcQTljaWyrIAWXTBQidCdkDxcBIFpchRJBAU9A=;
b=Zyr0W1Y4JQyypcAd02BbQuE98pUZ/U1rYlDLoxFFbM+5wl1+A5enKzaSMmf2bxZwqk
7jErwrfSWIYtRc4SBzEHWye5AfTJTlfomIcO9zt3Q+4rVaJX7ZkGfR4VNBxC4o+YaF2s
0OKpyBYiJNHmrs1PY/YCY1cedhHsmmuBYxIKONHo3c5d/iHt4qllBumxU7EodzK/CJqy
vMEogOMwAAXWND0PMKohOZeVgaJPCQD2LfwaKlY1kmUXW9eJjkPGwxEV06vI451eDs4l
LBWjK6zaNHc0ymwAykHmKPUhEBSrF4eLrNqmVxCrL/+MxNykjdj2iHRhhYVOKl1TKuDE
rkNA==
X-Gm-Message-State: AOJu0YxUG/Xq9qmT6/hhQ/wNPLtVwnuJyHK00JISmbeBATUJlP9OQgco
1MVG1jlqI1lS1kVHOKHUBCCH0mXC5939WCrJghqCWgU6
X-Google-Smtp-Source: AGHT+IGkHM66n+PW1Ha+7txMld+NPPIHEqI557pxIoRNF5KI2a3PliBilwQFBp+PYhvpNzuOWYLtBft0XeJalUA7ztg=
X-Received: by 2002:a2e:6a08:0:b0:2c3:cb49:43b9 with SMTP id
f8-20020a2e6a08000000b002c3cb4943b9mr1237539ljc.20.1698875738426; Wed, 01 Nov
2023 14:55:38 -0700 (PDT)
In-Reply-To: <6542c833.920a0220.6922f.1485@mx.google.com>
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: <CAPTjJmpNyOQMEog2aw-mN=izpf9eM8qKUYMsZyc-FAbaey3=UA@mail.gmail.com>
X-Mailman-Original-References: <nze9mu-VI8ExA3VA9RA07qMo9Oj03xuWoTe-FL6N_AbOGK0QC6LdqaeKq-OvcrilFYqqT5tc9LsvSqHRKDYMGaBXzlVzyOdX9Ae0Xp_ACtg=@protonmail.com>
<6542be44.050a0220.e7b44.2143@mx.google.com>
<CAPTjJmp6nTDSApa4iYtDu72ZQTrR97wEchQ6fkJExktHZgLLvA@mail.gmail.com>
<6542c833.920a0220.6922f.1485@mx.google.com>
 by: Chris Angelico - Wed, 1 Nov 2023 21:55 UTC

On Thu, 2 Nov 2023 at 08:52, Grant Edwards via Python-list
<python-list@python.org> wrote:
>
> On 2023-11-01, Chris Angelico via Python-list <python-list@python.org> wrote:
> > On Thu, 2 Nov 2023 at 08:09, Grant Edwards via Python-list
> ><python-list@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.
>
> Ah, I forgot about defaulting to a local domain if one is
> omitted. Will MTAs do that these days?

Yeah they will; but that'll depend on the exact server you send to,
whereas if you have a domain part, all you need is some server that
accepts mail for forwarding.

> > (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.)
> >
> > So the regex to match all valid email addresses that aren't
> > local-only is... drumroll please...
> >
> > r"@"
>
> Unless you want to support UUCP or X400 addresses...
>
> :)

Yyyyyyyyeah I think we can assume SMTP these days :)

ChrisA


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

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor