Is there a better place to post this?
Patch to vlogin/functions.php: =============================================== --- functions.php Fri Apr 2 04:55:05 2004 +++ functions.php.new Fri Apr 2 04:52:27 2004 @@ -610,7 +610,7 @@
global $notPartOfDomainName, $chopOffDotSectionsFromRight,
$chopOffDotSectionsFromLeft, $numberOfDotSections,
- $checkByExcludeList, $at, $dot,
+ $checkByExcludeList, $at, $dot, $reverseHostNameForLogin,
$removeFromFront, $translateHostnameTable, $pathToQmail;@@ -681,6 +681,22 @@
//
$hostname = preg_replace('/^\./', '', $hostname);
$hostname = preg_replace('/\.$/', '', $hostname);
+
+
+ // If the domain needs to be represented in top-down order (i.e.
+ // org.squirrelmail instead of squirrelmail.org), transform it now so that
+ // dot substitution can't play games with it.
+ // (This isn't really the correct place to do this. It should either be the
+ // first or the last transformation of the domain name. But we can't risk
+ // putting it after dot substitution; I don't want to be too radical with
+ // this patch; and making this the first thing done seems unorthodox.)
+ if (!empty($reverseHostNameForLogin)) {
+ $segments = preg_split( '/\./', $hostname );
+ $tmphostname = '';
+ foreach ($segments as $seg)
+ $tmphostname = "$seg.$tmphostname";
+ $hostname = preg_replace('/\.$/', '', $tmphostname);
+ }
// just in case they need a different '.' seperator ===============================================
Patch to vlogin/data/config.php.sample: =============================================== --- config.php.sample Tue Feb 3 18:10:11 2004 +++ config.php.sample.new Fri Apr 2 04:50:41 2004 @@ -10,7 +10,7 @@ $allVirtualDomainsAreUnderOneSSLHost, $debug, $removeFromFront, $chopOffDotSectionsFromRight, $chopOffDotSectionsFromLeft, $translateHostnameTable, $pathToQmail, $atConversion, - $removeDomainIfGiven; + $removeDomainIfGiven, $reverseHostNameForLogin;
@@ -226,6 +226,12 @@ // username (such as "[EMAIL PROTECTED]") // $putHostNameOnFrontOfUsername = 0; + + + // indicates that the hostname should be translated to top-down order for + // purposes of constructing the IMAP username, i.e. "com.domain.webmail" + // instead of "webmail.domain.com". + $reverseHostNameForLogin = 0;
// you can choose not to append the host name to users' login ===============================================
-- Will Berry Co-founder, Second Brain website hosting http://www.secondbrainhosting.com/
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click -- squirrelmail-users mailing list List Address: [EMAIL PROTECTED] List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=2995 List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
