[imp] IMP 4.0.1 Virtual Hosting - Default Identity Setting

Steven Theisen stheisen at cybertie.net
Thu Jan 6 06:26:56 PST 2005


Please help, I am at my wits end ;)

I am running Horde/IMP with a group of virtual hosts sharing the same IP (HTTP
1.1). I need to automatically set the "reply to" and "from" addresses in the
default identity based on the domain used in the HTTP_HOST. Using the IMP
options, if I set custom "reply to" and "from" addresses in a new profile, then
it appears to work.  I really need to do this automatically like I was able to
in IMP 3.x

I am running the following Horde installation on a Fedore Core 2 system:

- Horde 3.0.1
- IMP 4.0.1
- Turba 2.0

My Horde installation is properly configured to handle multiple domains (via
Apache):

http://mail.domain1.net
http://mail.domain2.net
http://mail.domain3.net

I am trying to get the Default Identity of the user to contain the domain URL
being used.  In Imp 3.x I achieved this by making the following changes to
servers.php:

$vdomain = $_SERVER['HTTP_HOST'];
$vdomain = preg_replace('|^mail\.|i', '', $vdomain);
$vdomain = preg_replace('|^horde\.|i', '', $vdomain);

$servers['imap'] = array(
    'name' => 'IMAP Login',
    'server' => 'localhost',
    'hordeauth' => true,
    'protocol' => 'imap/notls',
    'port' => 143,
    'folders' => 'Mail/',
    'namespace' => '',
    'maildomain' => $vdomain,
    'smtphost' => $vdomain,
    'realm' => '',
    'dotfiles' => false,
    'preferred' => $vdomain,
    'hierarchies' => array()
);

This does not seem to be sufficent for IMP 4.x no matter which domain I log
into, the "reply to" and "from" addresses are always domain1.net.
If I set custom "reply to" and "from" addresses in a new profile, then it
appears to work.  I need to automatically set the "reply to" and "from"
addresses in the default identity based on the domain used in the HTTP_HOST.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


More information about the imp mailing list