[imp] question about IMP 2.3.7 (multiple domains)

Atif Ghaffar aghaffar@developer.ch
Mon, 12 Mar 2001 10:02:48 +0100


If you want a dynamic setting.
assuming that the imap server for all domains is the same.


<?php
$domain=preg_replace("/(\w+)\.([\w\-]+)\.(\w+)\:*.*/", "\\2.\\3",
$HTTP_SERVER_VARS['SERVER_NAME']);
$servers = array();
$servers['imap'] = array(
    'name' => $domain,
    'server' => 'host.domain1.org',
    'protocol' => 'imap',
    'port' => 143,
    'folders' => 'mail/',
    'namespace' => '',
    'maildomain' => $domain,
    'preferred' => "webmail.$domain"
);
?>


cheers



Ronald Bootsman wrote:
> =

> I have setup IMP 2.3.7, and it's working fine.
> As I run to different domains on the same server, I want to serve them =
with
> the IMP Webmail.
> Setup in imp/config/servers.php the 2 domains, but when I enter one of =
the 2
> webmail sites, only the last domain entry is visible and active in both=

> webmail sites!(domain2.org in this case).
> This is how my servers.php looks like:
> =

> <?php
> $servers = array();
> =

> $servers['imap'] = array(
>     'name' => 'domain1.org',
>     'server' => 'host.domain1.org',
>     'protocol' => 'imap',
>     'port' => 143,
>     'folders' => 'mail/',
>     'namespace' => '',
>     'maildomain' => 'domain1.org',
>     'preferred' => 'webmail.domain1.org'
> );
> $servers['imap'] = array(
>     'name' => 'domain2.org',
>     'server' => 'host.domain1.org',
>     'protocol' => 'imap',
>     'port' => 143,
>     'folders' => 'mail/',
>     'namespace' => '',
>     'maildomain' => 'domain2.org',
>     'preferred' => 'webmail.domain2.org'
> );
> ?>
> =

> Am I missing some configuration somewhere ? Or doesn't it work in this
> version ?
> =

> -----------------------------------------------------
> Regards,
> =

> Ronald Bootsman
> =

> Email     Ronald@Bootsman.Net
> =

> --
> IMP mailing list: http://horde.org/imp/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org

-- 
Atif Ghaffar
Internet Development Manager
4unet AG/SA/Ltd.
-------------------------.
        +41 21 351 53 60 ¦ voice
        +41 78 787 51 45 ¦ mobile
        +41 86 0796598972¦ fax
    http://www.4unet.net ¦ www
http://atif.developer.ch ¦ homepage
  atif.ghaffar@4unet.net ¦ email