[imp] IMP with virtual hosting. Username rewrinting rules.

Dmitri B. Gofmekler gosha@arvid.ee
Fri, 16 Mar 2001 17:29:35 +0200


Ronald,

Thanks a lot for help, but please answer also three questions:

1. I cant find a webmail URL in your PHP code.
2. Here is only one server and domain definition... I need 8 domains. Where
to show others?
3. And I dont see any code that looks like username rewrinting rules.



Very big thanks,
Dmitri.


> Dmitri,
>
> this is how your servers.php should look like.
> Replace the server variable with your real hostname, and the webmail URL
> with your's
>
>
> ?php
> $domain=preg_replace("/(\w+)\.([\w\-]+)\.(\w+)\:*.*/",
> "\\2.\\3",$GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME']);
>
> $servers['imap'] = array(
>     'name' => $domain,
>     'server' => 'host.domain.org',
>     'protocol' => 'imap',
>     'port' => 143,
>      'folders' => 'mail/',
>      'namespace' => '',
>      'maildomain' => $domain,
>     'preferred' => "webmail.$domain"
> );
> ?>