Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

MS Exchange Data Location

by Tuna (Friar)
on Jun 21, 2001 at 23:16 UTC ( [id://90499]=perlquestion: print w/replies, xml ) Need Help??

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

Hi, I am brand-new to Perl on Windows 9x, NT. I need to write a little script which will return a list of distribution lists and their respective owners. This is applicable to MS Exchange 5.5.

My problem is that I have no clue as to where that information is stored on the server, nor in what format. Any ideas?

Replies are listed 'Best First'.
Re: MS Exchange Data Location
by enoch (Chaplain) on Jun 22, 2001 at 01:36 UTC
        I work a lot with MS Exchange, also. I am still playing with the LDAP stuff and trying to get Exchange to comply (which isn't trivial).
        In the meantime, I have kludged a little system together that will do what I need it to do via system calls to the admin.exe program that comes with Exchange Admin.
    open(CSV,">import.csv"); #open file to import to Exchange # write the CSV header my $lineCSV = "Obj-Class,Mode,First Name,Last Name,Display Name,"; $lineCSV .= "Alias Name, Directory Name,Primary Windows NT Account,"; $lineCSV .= "Home-Server,Hide From AB,Alternate recipient,"; $lineCSV .= "Deliver to both,E-mail address\n"; # write the data we want to import $lineCSV .= "MAILBOX,UPDATE," . $firstname . "," . $lastname . ","; $lineCSV .= "\"" . $fullname . "\"," . $username . "," . $username . " +,"; $lineCSV .= "domain\\" . $username . ",MAILSERVER"; $lineCSV .= "0,,,"; #print it to CSV and close it print CSV $lineCSV; close(CSV); # run the commandline import with specified options my $exchCommand = "c:\\exchsrvr\\bin\\admin.exe /i import.csv "; $exchCommand .= "/d " . $refRS->Fields("mailServer")->value; $exchCommand .= " /n /o options.txt"; my $exchOut = `$exchCommand`;
        Like I said, it is a huge kludge; but it gets the job done while I torture the Exchange server trying to get the LDAP stuff going.     For distribution lists, everything is surprisinly similar. Here is a good Exchange reference article. But, the big thing to change is the Obj-Class field needs to be "DL" and not "MAILBOX." But, reading the article over and playing with the command, you will get used to it (as much as anyone can get used to Exchange).

    Jeremy
Re: MS Exchange Data Location
by BigJoe (Curate) on Jun 22, 2001 at 00:41 UTC
    I know alot of that information is stored in the LDAP for exchange but I am not sure where the distrobution lists are.

    --BigJoe

    Learn patience, you must.
    Young PerlMonk, craves Not these things.
    Use the source Luke.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2024-05-21 10:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found