[imp] get mailserver from login

ke@helinet.de ke@helinet.de
Fri, 07 Jun 2002 17:30:29 +0200



As we have multiple mailserver with multiple domains and don't want a select 
button on the login page, we try to do this: the user gives his full 
mail-address as login (user@domain.de) and we get the "true" login (user) from 
the address and the mailserver (mail.domain.de)
After reading the mails from Edwin regarding "mail domain", I tried to invoke 
vinfo (with some changes) and changed my servers.php:

$servers['imap2'] = array(
    'name' => $vdomain,
    'server' => 'mail.'.$vdomain,
    'protocol' => 'imap',
    'port' => 143,
    'folders' => '',
    'namespace' => '',
    'maildomain' => $vdomain,
    'smtphost' => 'localhost',
    'realm' => '',
    'preferred' => ''
);

The problems seems to be to get the $vdomain in servers.php. I suggested, 
something like
($user,$vdomain)= split ("\@",$imp['user']);
would do the job, but this is wrong. Does anyone know, how to get the domain 
from the login-page in servers.php?

Viele Grüße,
Kerstin