On Mon, 2009-01-26 at 01:43 -0800, glenn@... wrote:
> Good Day All! I am attempting to configure the vlogin plugin (3.10.1) for
> SM to allow a user to login with a username of the format
> "USERNAME@...". I need to use the DOMAIN.TLD and prepend
> "webmail." to it as the IMAP Server. I have fought with this for hours
> and am beat up!!! :-)
>
> Any assistance would be incredibly welcome!!! My configuration and debug
> information is below.
>
> TIA,
> glenn
>
> ==========
> SM 1.4.8
> vlogin 3.10.1
> multilogin 2.4
> compatibility 2.0.14
>
>
> ==========
> config.php for vlogin:
> <?php
>
> // Global Variables, don't touch these unless you want to break the plugin
> //
> global $notPartOfDomainName, $numberOfDotSections, $useSessionBased,
> $putHostNameOnFrontOfUsername, $checkByExcludeList,
> $at, $dot, $dontUseHostName, $perUserSettingsFile,
> $smHostIsDomainThatUserLoggedInWith,
> $useDomainFromServerEnvironment, $virtualDomains,
> $sendmailVirtualUserTable, $virtualDomainDataDir,
> $allVirtualDomainsAreUnderOneHost, $vlogin_debug, $removeFromFront,
> $chopOffDotSectionsFromRight, $chopOffDotSectionsFromLeft,
> $translateHostnameTable, $pathToQmail, $atConversion,
> $removeDomainIfGiven, $alwaysAddHostName, $reverseDotSectionOrder,
> $replacements, $usernameReplacements, $forceLowercase,
> $securePort, $useDomainFromVirtDomainsArray,
> $usernameDomainIsHost, $stripDomainFromUserSubstitution,
> $serviceLevelBackend, $internalServiceLevelFile,
> $vlogin_dsn, $sqlServiceLevelQuery, $SQLDatabaseDomainLookup,
> $SQLDatabaseUserLookup, $SQLDatabaseServiceLevelLookup,
> $default_org_logo, $rawLoginIsOutgoingEmailAddress,
> $dontUseHostNameUserList, $always_prepend, $always_append,
> $IMAPServerRules, $SMTPServerRules, $postProcessingPattern,
> $postProcessingReplacement, $virtualUserTableDBFlavor,
> $override_config_during_login, $appendDomainToOutgoingEmailAddress;
>
>
> $useSessionBased = 1;
> $virtualDomains = array();
> $useDomainFromVirtDomainsArray = 0;
> $useDomainFromServerEnvironment = '';
>
> $reverseDotSectionOrder = 0;
>
> $numberOfDotSections = 2;
> $removeFromFront = 1;
>
> $checkByExcludeList = 1;
>
> $notPartOfDomainName = array('www'
> ,'mail'
> ,'email'
> );
>
> $always_prepend = '';
>
> $always_append = '';
>
> $chopOffDotSectionsFromLeft = 0;
>
> $chopOffDotSectionsFromRight = 0;
>
> $at = '@';
>
> $dot = '.';
>
> $atConversion = array();
>
> $forceLowercase = 0;
>
> $replacements = array(
> );
>
> $alwaysAddHostName = 0;
>
> $putHostNameOnFrontOfUsername = 0;
>
> $dontUseHostName = 1;
>
> $dontUseHostNameUserList = array(
> );
>
> $smHostIsDomainThatUserLoggedInWith = 1;
>
>
> $removeDomainIfGiven = 0;
>
> $usernameDomainIsHost = 0;
>
> $rawLoginIsOutgoingEmailAddress = 0;
>
> $appendDomainToOutgoingEmailAddress = 0;
>
> $virtualDomainDataDir = '';
>
> $allVirtualDomainsAreUnderOneHost = '';
>
> $securePort = 443;
>
> $stripDomainFromUserSubstitution = 0;
>
> $usernameReplacements = array(
> );
>
> $sendmailVirtualUserTable = '';
>
> $virtualUserTableDBFlavor = '';
>
> $postProcessingPattern = '';
> $postProcessingReplacement = '';
>
> $translateHostnameTable = '';
>
> $pathToQmail = '';
>
> $default_org_logo = '';
>
> $perUserSettingsFile = '';
>
>
>
> $IMAPServerRules = array(
> $always_prepend = 'webmail.',
> $numberOfDotSections = 3
> );
>
>
>
> $SMTPServerRules = array(
> );
>
> $serviceLevelBackend = 0;
>
> $SQLDatabaseDomainLookup = '';
> $SQLDatabaseUserLookup = '';
> $SQLDatabaseServiceLevelLookup = '';
>
> $override_config_during_login = 1;
>
> $vlogin_debug = 1;
>
> ==========
> DEBUG OUTPUT if I login with USERNAME@... (note the lack of dots or
> the always_prepend in the IMAP server):
> Your original username was:
>
> USERNAME@...
> Your IMAP login was resolved to:
>
> USERNAME@...
>
> PHP_SELF is /webmail/src/redirect.php
> IMAP server: DOMAINTLD
>
> ==========
> DEBUG OUTPUT if I login with USERNAME (note the lack of dots in the IMAP
> Server):
> Your original username was:
>
> USERNAME
> Your IMAP login was resolved to:
>
> USERNAME
>
> PHP_SELF is /webmail/src/redirect.php
> IMAP server: webmailDOMAINTLD
>
I played with this for a little bit and here is what I have come up
with. For some reason the code for IMAPServerRules in function.php
removes all the "."'s from $server_addr variable. What is more
interesting is that the $imap_domain variable, which is assigned just
before assigning $server_addr appears to contain the fully processed
IMAP Server address. I'm not sure, but I think the whole code block that
assigns $server_addr (starting around line 505 in function.php) appears
to be redundant, as the $imap_domain already contained the formatted
IMAP Server name for me. I only tried a couple simple tests (prepend and
append) but those changes were present once $imap_domain was assigned.
If your not opposed to hacking some code to see if you can get the
results you are looking for, you can try to edit line 551 and change
"$server_addr" to "$imap_domain" (since you are using session based).
You should also make the same change 555 in case you turn on session
based.
If these changes get you the results you are looking for, please let the
list know so we can pursue it further.
--
Brett Johnson <brett@...>
|