diff options
author | Thomas Arendsen Hein <thomas@intevation.de> | 2007-07-16 16:05:16 (GMT) |
---|---|---|
committer | Thomas Arendsen Hein <thomas@intevation.de> | 2007-07-16 16:05:16 (GMT) |
commit | e8532fa91d1d3eb20f49367206183bce2fa3ea85 (patch) | |
tree | 03b1d723812f20f6fc9fcc2b8aba890329f5672e | |
parent | e4740036d322f6af54ecb64efa4bc76f70e744ad (diff) | |
download | kolab-webadmin-e8532fa91d1d3eb20f49367206183bce2fa3ea85.tar.gz |
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
-rw-r--r-- | www/admin/user/user.php.in | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/www/admin/user/user.php.in b/www/admin/user/user.php.in index e478b5a..43b9ca9 100644 --- a/www/admin/user/user.php.in +++ b/www/admin/user/user.php.in @@ -148,49 +148,6 @@ function checkdelegate( $form, $key, $value ) { 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..@kolab.org -// email1.-@kolab.org -// email1._@kolab.org -// email1@2sub.kolab.org -// email1@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 @@ -479,12 +436,6 @@ $entries['kolabdelegate'] =array( 'name' => _('Email-Delegates'), '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') ); $entries['ou_0'] = array( 'name' => _('Organisational Unit') ); |