[imp] Getting IMP to append virtual host to user@

Sean D. mojospam at thegeekclub.net
Tue Apr 20 03:05:00 PDT 2004


in servers.php this works with apache..
that first bit of code works anywhere really..
if you need to set other variables... vhook function is probably the preferred 
way though...

$headers = getallheaders();
$patterns[0] = "/^webmail\./";
$patterns[1] = "/^www\./";
$patterns[2] = "/^mail\./";
$vdomain = getenv('HTTP_HOST');
$vdomain = preg_replace($patterns, '', $vdomain);


$servers['imap'] = array(
     'name' => 'IMAP Server',
     'server' => 'localhost',
     'protocol' => 'imap/notls',
     'port' => 143,
     'folders' => 'INBOX.',
     'namespace' => '',
     'maildomain' => $vdomain,
     'smtphost' => 'localhost',
     'realm' => $vdomain,
     'preferred' => ''
);


Sean D. wrote:
> i have a few lines of code that works with apache for that.. no idea how 
> it would affect IIS6... i will post them later.. if i forget email me 
> direct.
> 
> Eric Brown wrote:
> 
>> I have IMP and HORDE running on IIS6 (works perfect!) as a virtual 
>> subdomain for
>> all of my domains (webmail.mydomains.com). The virtual host settings 
>> work fine
>> (I have to add each server manually to the horde config files), but IMP
>> requires users to login via user at domain.com. How can I get the login 
>> to append
>> @domain.com based on what virtual host they came through if they do 
>> not do it
>> themselves?
>>
>> Thanks :)
> 
> 



More information about the imp mailing list