Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

how access exchange server using perl

by cstsang (Initiate)
on Aug 24, 2001 at 10:07 UTC ( [id://107626]=perlquestion: print w/replies, xml ) Need Help??

cstsang has asked for the wisdom of the Perl Monks concerning the following question:

How to access exchange server directory service using perl? I am using active perl 5.6 on Win. NT server , iplanet platform. Is it possible using NT account name to search all information about this user ?

Replies are listed 'Best First'.
Re: how access exchange server using perl
by rob_au (Abbot) on Aug 24, 2001 at 10:58 UTC
    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!
Re: how access exchange server using perl
by idnopheq (Chaplain) on Aug 24, 2001 at 21:38 UTC
    Go grok the ActiveState Perl-Win32-Admin list archives ... there's a fine sample about every week, using OLE usually ... or ADSI ... I get them confused now that I am AD-free ...

    If memory serves, Dave Roth has some samples on his site and in his books. Also check out Win32::Lanman ... I think it has some AD capabilities as well ...

    HTH
    --
    idnopheq
    Apply yourself to new problems without preparation, develop confidence in your ability to to meet situations as they arrise.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://107626]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-23 21:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found