From bc2b62bddab69ed42327997b6068738ccb878e16 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Mon, 2 Mar 2020 17:11:37 +0100 Subject: [PATCH] remail: Relax the mail validation so new gTLDs have a chance to pass These days it is common to see mail addresses from the newer TLDs that do not always fit in two to three chracters. These are not covered by the basic mail address validation regex. Relax the requirement from two or three characters to just two or more characters to covers these. Signed-off-by: Andreas Rammhold Signed-off-by: Thomas Gleixner --- remail/mail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remail/mail.py b/remail/mail.py index f2278dc..03a8a93 100644 --- a/remail/mail.py +++ b/remail/mail.py @@ -106,7 +106,7 @@ def send_mail(msg_out, account, mfrom, sender, listheaders, use_smtp): msg_deliver(msg_out, account, mfrom, sender, use_smtp) # Minimal check for a valid email address -re_mail = re.compile('^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$') +re_mail = re.compile('^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$') def email_addr_valid(addr): return re_mail.match(addr)