Re: can't get vlogin plugin to use username as default From address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please don't top post.  In-context replies are much easier to manage
and remember.

> I do have multilogin patched in (sorry I didn't mention it before), so
> that's why the usesessionbased is set to 1... but I'm not really using the
> functionality that multilogin provides (I don't think).

If you have $useSessionBased set to 1, then you are using it.  Please
make sure the patch is applied and multilogin is in the plugins
directory or turn that setting off.

> I've set the domain in the virtual_domains array, but it doesn't seem to
> work -- evidenced by the fact that composed emails get the proper domain
> appended only if the URL I use to access SM is also the proper domain.
> Maybe one of my other settings is wrong, and I've included my config file
> again below.

What does it say when you turn the debug flag on, both when accessing
from the proper domain as well as the master domain?

Looking at your config, these conflict with one another:

>   $useDomainFromVirtDomainsArray = 1;
>   $dontUseHostName = 1;
>   $smHostIsDomainThatUserLoggedInWith = 1;

Specifically, if you want different domains for each user after
logging in, please don't turn on $smHostIsDomainThatUserLoggedInWith

> The other thing is that I want to use the email address in the virtusertable
> as the from address, which is not the same as username@xxxxxxxxxxx  If my
> virtusertable looks like this:
>         alias@xxxxxxxxxx                username
> then I want to have the emails coming from alias@xxxxxxxxxx and not
> username@xxxxxxxxxxx
>
> Right now if I login with the URL of https://mail.hostname.tld and use my
> alias@xxxxxxxxxx to login, then I get the correct account (the virtusertable
> lookup is happening correctly)... but the composed emails come from
> username@xxxxxxxxxxxxx  If I login with the URL of https://mail.domain.tld
> (and deal with the popup warnings) and user alias@xxxxxxxxxx to login, I get
> the correct account, but composed emails come from username@xxxxxxxxxx
> (again, instead of the desired alias@xxxxxxxxxx).

SM has one and only one username.  Vlogin helps SM figure out what the
correct username is given sometimes different user input.  As Tomas
mentioned, it might be possible for Vlogin to try to remember the user
input, but I'd have to see how possible that is, then we'd have to
make decisions about how/if it should override any setting for the
email preference (see next sentence), and I would be concerned in
general that it would give users too much power and flexibility in
some situations.  The best way to deal with this is to simply make
sure the email address in the Options->Personal Information page is
set up correctly for your users.  There are even some plugins to help
you automate the population of that preference value.


> -----Original Message-----
> On 6/18/06, Christopher J. Hinkle <chinkle@xxxxxxxxxxx> wrote:
> > I see... I didn't realize that's how vlogin worked.  I tried going to
> > the virtual domain URL and logging in as myemail@xxxxxxxxxxxxxxxxxx
> > This time when I sent a message I got the From address to be
> > myusername@xxxxxxxxxxxxxxxxxxxx so we're almost there.  :)
>
> So I would think that setting the 'domain' in the virtual_domains array
> would do the job.  If the actual usernames are in the form "username" (and
> not "username@xxxxxxxxxx"), SM should be just appending the default domain
> to outgoing messages.  If that is what your situation is (depends what's in
> your virtual map I suppose), but it isn't working, that could be because you
> need to use the multilogin part of things.  BTW, I see no reason why the
> compatibility plugin would break SELinux policies...?  Also, please turn off
> $useSessionBased if you have not applied the multilogin patch and don't have
> that plugin in place too.
>
>  - paul
>
> # config.php
> <?php
>   global $notPartOfDomainName, $numberOfDotSections, $useSessionBased,
>          $putHostNameOnFrontOfUsername, $checkByExcludeList,
>          $at, $dot, $dontUseHostName, $perUserSettingsFile,
>          $smHostIsDomainThatUserLoggedInWith, $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;
>   $useSessionBased = 1;
>   $virtualDomains = array(
>         'domain1.com' => array(
>                 'domain' => 'domain1.com',
>                 'org_name' => '###VIRTUAL_DOMAIN###',
>                 'org_title' => '###VIRTUAL_DOMAIN### Mail',
>                 'motd'  => 'Welcome!',
>                 'settingsWithEmbeddedPHP' => array(
>                         'org_name',
>                         'org_title'
>                         )
>                 ),
>         'domain2.net' => array(
>                 'domain' => 'domain2.net',
>                 'org_name' => '###VIRTUAL_DOMAIN###',
>                 'org_title' => '###VIRTUAL_DOMAIN### Mail',
>                 'motd'  => 'Welcome!',
>                 'settingsWithEmbeddedPHP' => array(
>                         'org_name',
>                         'org_title'
>                         )
>                 )
>   );
>
>   $useDomainFromVirtDomainsArray = 1;
>   $reverseDotSectionOrder = 0;
>   $numberOfDotSections = 2;
>   $removeFromFront = 1;
>   $checkByExcludeList = 1;
>   $notPartOfDomainName = array('www'
>                                ,'mail'
>                                ,'email'
>                                ,'webmail');
>   $chopOffDotSectionsFromLeft = 0;
>   $chopOffDotSectionsFromRight = 0;
>   $at = '@';
>   $dot = '.';
>   $atConversion = array();
>   $forceLowercase = 0;
>   $replacements = array(
>   //                  '-'  => '_',   // all dashes converted to underscores
>   //                  'xx' => '',    // all double xx's removed
>                        );
>   $alwaysAddHostName = 0;
>   $putHostNameOnFrontOfUsername = 0;
>   $dontUseHostName = 1;
>   $smHostIsDomainThatUserLoggedInWith = 1;
>   $removeDomainIfGiven = 0;
>   $usernameDomainIsHost = 0;
>   $virtualDomainDataDir = '';
>   $allVirtualDomainsAreUnderOneHost = '';
>   $securePort = 443;
>   $stripDomainFromUserSubstitution = 0;
>   $usernameReplacements = array(
>   //                  '-'  => '_',   // all dashes converted to underscores
>   //                  'xx' => '',    // all double xx's removed
>                                );
>
>   $sendmailVirtualUserTable = '/etc/postfix/virtual';
>
>   $translateHostnameTable = '';
>   $pathToQmail = '';
>   $default_org_logo = '';
>   $perUserSettingsFile = '';
>   $serviceLevelBackend = 0;
>   $internalServiceLevelFile =
> '/path/to/squirrelmail/plugins/vlogin/data/service
> _levels.dat';
>   $sqlServiceLevelQuery = 'SELECT service_level FROM users WHERE username =
> "%1"
> ';
>   $SQLDatabaseDomainLookup = '';
>   $SQLDatabaseUserLookup = '';
>   $SQLDatabaseServiceLevelLookup = '';
>   $vlogin_dsn = 'mysql://user:password@localhost/email_users';
>   $vlogin_debug = 0;
> ?>
>
>

All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
--
squirrelmail-users mailing list
Posting Guidelines: http://www.squirrelmail.org/wiki/MailingListPostingGuidelines
List Address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux