[imp] Connecting IMP to Exchange

Miroslaw Jaworski mjaw at ipartners.pl
Thu Feb 13 10:58:12 PST 2003


* Martijn Kools (martijn.kools at victorholland.nl) [030213 10:17] wrote:
> Hello,
> 
> I'm using Horde/IMP and all other plugins for some time now.
> (For testing purposes).
> I recently installed a production system on one of our servers at work.
> Problem is, that our main mailserver is an Exchange 2000 Server.
> I know it sucks but my boss wants it :)
> 
> I configured imp's servers.php and changed the imap server localhost setting
> to the Exchange Server imap4.
> It works great, i can read all my e-mails from the exchange server.
> 
> One problem:
> 
> I have to login with DOMAIN/username/mailboxalias otherwise Exchange 2000
> won't accept my authentication.
> When i'm sending mail through imp, the user recieving the e-mail will see as
> sendername:
> 
> from: DOMAIN/username/mailboxalias at domain.nl
> 
> Due to this problem (i think), no mails are reaching the internet, only
> internal sending works.
> 
> Is there any way to configure imp so that i only have to fill in my username
> and he
> automaticlly adds domain and mailboxname?

It's possible - check horde/imp/config/conf.php for 
$conf['hooks']['vinfo'] = '';

and explanations/example function below this definition.

This hook gives you easy possibility to change filled username in login
screen into anything you want. If you just need to statically add something
( same thing for every user ) - it's very easy, if dynamically ( something
individual for each user, which seems to be is your case ) - little bit
more complicated.

Below is an example from one of my horde/imp installations:

$conf['hooks']['vinfo'] = 'imp_get_vinfo';

if (!function_exists('imp_get_vinfo')) {
    function imp_get_vinfo ($type = 'username') {
        global $conf, $imp;

        $vdomain = "fixed.domain";

        if ($type == 'username') {
            return $imp['user'] . '@' . $vdomain;
        } elseif ($type == "vdomain") {
            return $vdomain;
        } else {
            return new PEAR_Error('invalid type: ' . $type);
        }
    }
}

Before, users had to log in using login at fixed.domain, now they're 
using only login.

In your case you'll probably need to connect somewhere or check some
file where you store your username mailboxalias mapping ( DOMAIN
in DOMAIN/username/mailboxalias is fixed in your environement i presume ).

> Or is there any other way to connect to the exchange server and use the
> local linux imap server
> for authentication and sending and recieving emails?

For sending emails better use something local or at least "normal" :) -
remote sendmail/postfix/exim - whatever you like.

MJ

-- 
Miroslaw.Jaworski at gts.pl  ( Psyborg )  MJ102-RIPE  GTS Internet Partners SA
Servers Administration Department Manager


More information about the imp mailing list