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

Ronald Bootsman ronald@bootsman.net
Fri, 16 Mar 2001 16:09:23 +0100


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"
);
?>