[imp] Virtual domain support

Hammad hammad at brisksolutions.com
Wed Feb 12 11:27:57 PST 2003


There is a shoter way in imp/config/servers.php

$DOMAIN = preg_replace('|^webmail\.|i', '', $GLOBALS['HTTP_HOST']);
$DOMAIN = strtolower($DOMAIN);

$servers['imap'] = array(
    'name' => 'IMAP Server',
    'server' => 'localhost',
    'protocol' => 'imap/notls',
    'port' => 143,
    'folders' => 'INBOX.',
    'namespace' => '',
    'maildomain' => '',
    'smtphost' => 'localhost',
    'realm' => $DOMAIN,
    'preferred' => ''
);

--
Hammad


Quoting Bruno Negrao <imp-bnegrao at engepel.com.br>:

|  1 - In /etc/httpd/httpd.conf, create 1 virtual host for each domain,
| example:
| 
| NameVirtualHost 192.168.39.1:80
| 
| <VirtualHost 192.168.39.1:80>
|     DocumentRoot /var/www/html/horde/imp
|     ServerName webmail.velonorte.com.br
|     Alias /horde/ /var/www/html/horde/
|     ErrorLog logs/webmail.velonorte-error_log
|     CustomLog logs/webmail.velonorte-access_log common
| </VirtualHost>
| 
| <VirtualHost 192.168.39.1:80>
|     DocumentRoot /var/www/html/horde/imp
|     ServerName webmail.dcml.com.br
|     Alias /horde/ /var/www/html/horde/
|     ErrorLog logs/webmail.dcml-error_log
|     CustomLog logs/webmail.dcml-access_log common
| </VirtualHost>
| 
| (remember to restart httpd after changes!!)
| 
| 2  -  in ~imp/config/servers.php create one entry for each virtual host,
| example:
| 
| $servers['imap_1'] = array(
|     'name' => 'Servidor Velonorte',
|     'server' => 'mailgw.cvsa.egp',
|     'protocol' => 'imap/notls',
|     'port' => 143,
|     'folders' => 'INBOX.',
|     'namespace' => '',
|     'maildomain' => '',
|     'smtphost' => 'mailgw.cvsa.egp',
|     'realm' => 'velonorte.egp',
|     'preferred' => 'webmail.velonorte.com.br'
| );
| 
| $servers['imap_2'] = array(
|     'name' => 'Servidor DCML',
|     'server' => 'mailgw.dcmlbh.egp',
|     'protocol' => 'imap/notls',
|     'port' => 143,
|     'folders' => 'INBOX.',
|     'namespace' => '',
|     'maildomain' => '',
|     'smtphost' => 'mailgw.dcmlbh.egp',
|     'realm' => 'dcmlbh.egp',
|     'preferred' => 'webmail.dcml.com.br'
| );
| 
| You can add as much as you want. The 'preferred' field contains the same
| url
| that you specified in httpd.conf-ServerName. Based on the URL IMP the user
| used, IMP can choose the right server to authenticate that user.
| 
| 3  -  In the file ~imp/conf.php, put the value 'hidden' on the following
| setting:
| /**
|  ** Mail Server Settings
|  **/
| // Should we display a list of servers (defined in config/servers.php)
| // for users to choose from? The options are 'shown', 'hidden', and
| // 'none'. If the server list is hidden then you can use the
| // 'preferred' mechanism to auto-select from it based on an HTTP
| // virtualhost or another piece of data. If it is shown, the user will
| // be able to pick from any of the options. If none, no server list
| // will be shown and the defaults will be used unless another
| // mechanism changes them.
| // BNEGRAO - 31/01/2003
| $conf['server']['server_list'] = 'hidden';
| 
| 
| I think that's all. Tell me if I'm missing something.
| 
| Bruno.
| 
| 
| 
| ----- Original Message -----
| From: "Tom Smith" <tom at openadventures.org>
| To: <imp at lists.horde.org>
| Sent: Tuesday, February 11, 2003 6:56 PM
| Subject: [imp] Virtual domain support
| 
| 
| I need to setup Horde/IMP in a virtual domain environment.
| 
| Documentation for doing this is either scarc or I'm looking in the wrong
| places.
| 
| Can anyone direct me to the appropriate docs or provide me with information
| about how to do this?
| 
| Thanks in advance!
| 
| Tom Smith
| tom at openadventures.org
| http://www.openadventures.org/
| 
| 
| 
| 
| 
| --
| IMP mailing list
| Frequently Asked Questions: http://horde.org/faq/
| To unsubscribe, mail: imp-unsubscribe at lists.horde.org
| 
| 
| -- 
| IMP mailing list
| Frequently Asked Questions: http://horde.org/faq/
| To unsubscribe, mail: imp-unsubscribe at lists.horde.org
| 




More information about the imp mailing list