[imp] IMP: How can you retrieve mail from multiple backend servers?

Liam Hoekenga liamr at umich.edu
Tue Feb 18 09:17:19 PST 2003


David -

Write a function that retrieves the information you need from LDAP server, and
reference it from the server list.  Being php, the config files are actually
pretty flexible in what you can do with them.

For example, to determine what IMAP server our users talk to, we do...

    $servers['umce'] = array(
        'name' => 'UMCE IMAP Service',
        'server' => substr ($_SERVER['REMOTE_USER'],0,1) 
                    . '.imap.itd.umich.edu',
        ...);

There's no reason you couldn't do...

    function getMailServer($username){
        blah blah blah
        ...
        return($server);
    }

include that... then do..

    $servers['IMAP'] = array(
        'name' => 'IMAP Server',
        'server' => getMailServer($username),
        ...);

where $username contains (GASP!) the username.  We're able to get that from
$_SERVER['REMOTE_USER'], ymmv.

Liam

Quoting David Walsh <davow at OntheNet.com.au>:

> 
> This is a request for this subject also.
> 
> To summarize, is there an updated Scalable WebMail HOWTO for IMP 3.1.
> 
> I have a requirement to get IMP to talk to whatever mailserver (maildrop
> attribute) that is listed in LDAP for a user. I have searched the lists
> and google for this info but have found no example or instruction. I have
> seen plenty of requests for this feature though.
> 
> Can IMP 3.1 retrieve the mailserver ( or whatever ) attribute from LDAP
> instead of referring to the servers.php .
> Having a drop-down box list of mailservers is not an acceptable solution (
> as told to me by my Boss )
> 
> 
> Thank you to any enquiries.
> 
> If I get a good Howto, I promise to create a web-site with instructions.
> 
> Cheers
> 
> 
> 
> --- David Walsh
> 
> 
> -- 
> 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