From: Alexander Marx Date: Tue, 18 Jun 2019 07:55:35 +0000 (+0200) Subject: BUG12070: Its not possible to use the underscore in email addresses X-Git-Tag: v2.23-core135~13^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc724c142aa71d9e33d923599f31ec19bd2072e2;p=ipfire-2.x.git BUG12070: Its not possible to use the underscore in email addresses Using IPFire's Mailservice does not allow to enter a senders mail address with the underscore. The function used to verify that is used from general-functions.pl. Now the function 'validemail' allows the underscore in the address. Fixes: #12070 Signed-off-by: Michael Tremer --- diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl index 04e36969c4..aefcfb6878 100644 --- a/config/cfgroot/general-functions.pl +++ b/config/cfgroot/general-functions.pl @@ -784,7 +784,7 @@ sub validemail { return 0 if ( substr($parts[1],-1,1) eq '.' ); #check first addresspart (before '@' sign) - return 0 if ( $parts[0] !~ m/^[a-zA-Z0-9\.!\-\+#]+$/ ); + return 0 if ( $parts[0] !~ m/^[a-zA-Z0-9\.!\-\_\+#]+$/ ); #check second addresspart (after '@' sign) return 0 if ( $parts[1] !~ m/^[a-zA-Z0-9\.\-]+$/ );