thomas: server/kolab-webadmin/kolab-webadmin/www/admin/user user.php.in, 1.23, 1.23.2.1

cvs at kolab.org cvs at kolab.org
Mon Jul 16 18:05:18 CEST 2007


Author: thomas

Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user
In directory doto:/tmp/cvs-serv1333/kolab-webadmin/kolab-webadmin/www/admin/user

Modified Files:
      Tag: kolab_2_1_branch
	user.php.in 
Log Message:
Reverted kolabAllowSMTPRecipient changes for kolab_2_1_branch:

cvs diff -u -d -r1.19 -r1.20 kolab-webadmin/kolab-webadmin/www/admin/user/user.php.in|patch -p0 -s -R
cvs diff -u -d -r1.13 -r1.14 kolabd/kolabd/templates/slapd.conf.template.in|patch -p0 -s -R
cvs diff -u -d -r1.22 -r1.24 kolabd/kolabd/kolab2.schema|patch -p0 -s -R


Index: user.php.in
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user/user.php.in,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -u -d -r1.23 -r1.23.2.1
--- user.php.in	12 Jul 2007 16:28:23 -0000	1.23
+++ user.php.in	16 Jul 2007 16:05:16 -0000	1.23.2.1
@@ -148,49 +148,6 @@
   return '';
 }
 
-function checksmtprecipient ( $form, $key, $value ) {
-  $lst = array_unique( array_filter( array_map( 'trim', preg_split( '/\n/', $value ) ), 'strlen') );
-  $str = '';
-  foreach( $lst as $SMTPRecipient ) {
-    $trimmed = ltrim($SMTPRecipient, "-."); // potentially every entry is negated with a '-'
-    // $SMTPRecipient is either an 
-    // - email address
-    // - local part of an email address with an @ suffix
-    // - a domain part
-         
-    if (! ( valid_email_address($SMTPRecipient) 
-          | valid_domain($SMTPRecipient)
-          | valid_local_part($SMTPRecipient))
-      return sprintf(_("Syntax for Recipient %s is invalid"), $SMTPRecipient);
-    }
-  }
-  return '';
-}
-
-
-function valid_email_address($address) {
-// the following addresses are invalid
-// email1.. at kolab.org
-// email1.- at kolab.org
-// email1._ at kolab.org
-// email1 at 2sub.kolab.org
-// email1 at sub.sub.2sub.kolab.org
-  return preg_match("/^[a-z]+[a-z0-9]*[\.|\-|_]?[a-z0-9]+@([a-z]+[a-z0-9]*[\.|\-]?[a-z]+[a-z0-9]*[a-z0-9]+){1,4}\.[a-z]{2,4}$/i", $address));
-}
-
-function valid_domain($domain) {
-// the following subdomains are invalid
-// 2sub.kolab.org
-// sub.sub.2sub.kolab.org
-  return preg_match("/^[a-z]+[a-z0-9]*[\.|\-]?[a-z]+[a-z0-9]*[a-z0-9]+){1,4}\.[a-z]{2,4}$/i", $domain));
-}
-
-function valid_local_part($local_part) {
-  // the local part always has an @ appended
-  return preg_match("/^[a-z]+[a-z0-9]*[\.|\-|_]?[a-z0-9]+@/i", $local_part));
-}
-
-
 // Check uid/gid used in invitation policy
 // We're pretty relaxed about what is entered 
 // here and only check some basic syntax
@@ -478,12 +435,6 @@
 		'validation' => 'checkdelegate',
 		'comment' => _('Others allowed to send emails with a "from" address of this account.') . '<br/>' .
 			_('One email address per line.') );
-
-$entries['kolabAllowSMTPRecipient'] =array( 'name' => _('Allowed Recipients'),
-                'type' => 'textarea',
-                'validation' => 'checksmtprecipient',
-                'comment' => _('restrict allowed recipients of SMTP messages') . '<br/>' .
-                        _('One entry per line.') );
 
 $entries['title_0'] = array( 'name' => _('Title') );
 $entries['o_0'] = array( 'name' => _('Organisation') );





More information about the commits mailing list