Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: how access exchange server using perl

by rob_au (Abbot)
on Aug 24, 2001 at 10:58 UTC ( #107631=note: print w/ replies, xml ) Need Help??


in reply to how access exchange server using perl

It appears that the Directory Service on Microsoft Exchange Server makes use of the Lightweight Directory Access Protocol (LDAP) - Although, there seems to be some contention (unsupported on the MSKB) from independent information resources regarding the use of RPC Portmapper services to request connection prior to accessing the Directory Service via LDAP.
 
From the Perl perspective, there are two primary modules for interfacing LDAP - Net::LDAP and Mozilla::LDAP. The primary difference between these modules is the support of SSL encrypted sessions by Mozilla::LDAP (which I should note, Microsoft Exchange Server does optionally support) and external dependencies (Mozilla::LDAP requires the Mozilla/Netscape LDAP SDK). It is with these modules that I think you may have some success in accessing the Exchange Server Directory Service. For example, to connect to the Directory Service using Net::LDAP:
 

use Net::LDAP; # Make connection to LDAP server on Exchange Server # my ($ldap) = Net::LDAP->new($server, port => 389) || die "Unable to co +nnect to $server: $@\n"; # If anonymous binding to LDAP connection, do not pass any parameter +s to bind(), # alternatively, $binddn = domain name, $password = password # $ldap->bind($binddn, password => $password) || die "Unable to bind: $@ +\n"; . . . $ldap->unbind();

 
Unfortunately, I do not have a Microsoft Exchange Server locally which I can connect to and experiment with and as such I cannot guarentee this code. I can however point you to yet another reference that describes replacing Exchange Server with Open Source alternatives, which seems able to provide a lot of information on the working of Exchange Server - http://www.oswg.org/oswg-nightly/oswg/en_US.ISO_8859-1/articles/exchange-replacement-howto/exchange-replacement-howto.html#AEN213 - This is most definitely worth a read.
 

 
Ooohhh, Rob no beer function well without!


Comment on Re: how access exchange server using perl
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://107631]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2014-11-27 16:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (186 votes), past polls