mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/tglx/remail.git
synced 2024-12-28 05:20:56 +01:00
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 <andreas@rammhold.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
79d26fccfe
commit
bc2b62bdda
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue