ispman/install-data/templates users.ldif.template, 1.15, 1.15.6.1 vhosts.conf.template, 1.19, 1.19.2.1
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/install-data/templates
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv11362/install-data/templates
Modified Files:
Tag: dev_1_3-cyrus_virtdomain
users.ldif.template vhosts.conf.template
Log Message:
applied s0undt3ch's patch for cyrus virtudomain feature
Index: vhosts.conf.template
===================================================================
RCS file: /cvsroot/ispman/ispman/install-data/templates/vhosts.conf.template,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -d -r1.19 -r1.19.2.1
--- vhosts.conf.template 29 Sep 2004 20:46:12 -0000 1.19
+++ vhosts.conf.template 8 Sep 2006 13:15:40 -0000 1.19.2.1
@@ -58,16 +58,33 @@
$_statsText;
</perl>
-
<perl>
$acltext;
</perl>
+<perl>
+$_mod_rewriteText = '';
+$_unameText = '';
+
+if ( $ISPMan::Config->{'AllowFullEmailLogins'} ) {
+ $_unameText = join '@', ('', $ispmanDomain);
+} else {
+ $_unameText = join '_', ('', $ispmanDomain);
+ unless ( $ISPMan::Config->{'CyrusUnixHierarchySep'} ) {
+ $_unameText =~s/\./_/g;
+ }
+}
+
+$_mod_rewriteText=qq|
<IfModule mod_rewrite.c>
#If we have mod_rewrite then we can map users via rewrite and save on LDAP lookups
RewriteEngine On
- RewriteRule ^/~([^./]+)(.*) /ispman/domains/<perl>$ispmanDomain</perl>/users/$1_<perl>$d=$ispmanDomain; $d=~s/\./_/g; return $d</perl>/public_html$2
+ RewriteRule ^/~([^./]+)(.*) /ispman/domains/$ispmanDomain/users/\$1$_unameText/public_html\$2
</IfModule>
+|;
+
+$_mod_rewriteText;
+</perl>
<IfModule !mod_rewrite.c>
# If we do not have mod_rewrite
Index: users.ldif.template
===================================================================
RCS file: /cvsroot/ispman/ispman/install-data/templates/users.ldif.template,v
retrieving revision 1.15
retrieving revision 1.15.6.1
diff -u -d -r1.15 -r1.15.6.1
--- users.ldif.template 18 Apr 2004 19:19:32 -0000 1.15
+++ users.ldif.template 8 Sep 2006 13:15:39 -0000 1.15.6.1
@@ -25,8 +25,18 @@
sn: <perl>$r->param("sn")? $r->param("sn"):$r->param("userid")</perl>
cn: <perl>($r->param("givenName") && $r->param("sn"))? join " ", ($r->param("givenName"), $r->param("sn")) :$r->param("userid")</perl>
-uid: <perl>$r->param("uid")</perl>
-uid: <perl>join '@', ($r->param("userid"), $r->param("ispmanDomain"))</perl>
+uid: <perl>$r->param("uid");</perl>
+<perl>
+ $text="";
+ if ($ispman->getConf("AllowFullEmailLogins") == 1) {
+ my $text2=$r->param("uid");
+ $text2 =~ s/\.|\@/_/g;
+ $text.=$text2;
+ } else {
+ $text.=join '@', ($r->param("userid"), $r->param("ispmanDomain"));
+ }
+</perl>
+uid: <perl>$text</perl>
userPassword: <perl>$r->param("userPassword") || "noEntry"</perl>
uidNumber: <perl>$ispman->getUid()</perl>
gidNumber: <perl>$ispman->getDomainGid($r->param("ispmanDomain"))</perl>
@@ -48,7 +58,12 @@
<perl>
$text="";
if ($r->param("mailHost")){
- my $address=join '@', ($r->param("uid"), $r->param("mailHost"));
+ my $address="";
+ if ($ispman->getConf("AllowFullEmailLogins") == 1) {
+ $address=$r->param("uid");
+ } else {
+ $address=join '@', ($r->param("uid"), $r->param("mailHost"));
+ }
$text.="mailHost: ".$r->param("mailHost")."\n";
$text.="mailRoutingAddress: $address\n";
}
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642