[imp] get mailserver from login

Edwin Culp eculp@encontacto.net
Mon, 10 Jun 2002 08:23:42 -0700


Quoting ke@helinet.de:

| 
| 
| Hi Ed,
| 
| > | 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?
| > 
| > Kerstin,
| > 
| > I do it this way.
| >   
| this does not help at my side, as I don't have virtual domains on my 
| webserver. I really have different mailserver on (sometimes, not always) 
| different machines. That's why I would like the customer to type in 
| login@domain and not only login.
| I hope, I don't have to patch the code, as I don't have much experience with 
| php.

AFAIK, if you want to do this in servers.php, or any of the configure files,
you will have to depend on the apache/php variables such as $_SERVER because 
the configure files are included in login.php before processing.  That would
probably mean patching login.php.  Hopefully someone more qualified than I 
can give you a better solution.  An alternate login page may be an 
option.  I haven't tried that but I did see someones working source
on the list a few days ago.

Sorry,

ed

| 
| Regards, Kerstin


--