1 / 20

Pushing the Envelope With Perl: Using Perl With Microsoft Exchange

Pushing the Envelope With Perl: Using Perl With Microsoft Exchange. Rick Tatem Systems Programmer SAS Rick.Tatem@sas.com. About the speaker…. Started in the UNIX world (’92-99) Perl user since ~ ’94 Moved into NT by choice (’96) Something new Not backups  No Guru…. Microsoft Exchange.

zahur
Download Presentation

Pushing the Envelope With Perl: Using Perl With Microsoft Exchange

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Pushing the Envelope With Perl:Using Perl With Microsoft Exchange Rick Tatem Systems Programmer SAS Rick.Tatem@sas.com O'Reilly Open Source Convention

  2. About the speaker… • Started in the UNIX world (’92-99) • Perl user since ~ ’94 • Moved into NT by choice (’96) • Something new • Not backups  • No Guru… O'Reilly Open Source Convention

  3. Microsoft Exchange • Exchange version 5.5 • Information Store • transactional database • Private (mailboxes) and Public • Directory Service • LDAP compliant • Separate from the accounts database O'Reilly Open Source Convention

  4. Perl and Windows NT/2000 • Windows/UNIX issues • Binary distribution from ActiveState • Key modules • Win32::OLE • Win32::OLE::Enum • Perl Development Kit • PerlCtrl – create COM objects • Visual debugger • Perl2exe O'Reilly Open Source Convention

  5. Perl and Windows NT/2000 • Most example code is VBScript • Don’t reinvent the wheel • Translation is easy O'Reilly Open Source Convention

  6. Perl and Windows NT/2000 • VB to Perl example • All perl scripts begin with: use strict; use Win32::OLE; • Methods vs. Properties • Dot notation • ADO Connection example O'Reilly Open Source Convention

  7. Perl and Windows NT/2000 • VB Set conn = CreateObject("ADODB.Connection") conn.Provider = "ADSDSOObject" conn.Open "ADsProvider;CN=uid,DC=domain;pwd" • Perl my $conn = Win32::OLE->new("ADODB.Connection"); $conn->{'Provider'} = "ADsDSOObject"; $conn->Open("ADs Provider;CN=uid,DC=domain;pwd"); O'Reilly Open Source Convention

  8. Exchange-related Tasks • Message Tracking • Information Stores • Directory Services O'Reilly Open Source Convention

  9. Message Tracking Logs • Simple tab delimited text • Exchange Admin GUI tool for following messages throughout site • Usefulness (find source of virus outbreak) O'Reilly Open Source Convention

  10. Message Tracking Logs • Perl featured in Exchange Admin newsletter article (July, 2000) • Good • Used Perl  • Useful concept – overall message flow • Not good for multiple-server • Code Example O'Reilly Open Source Convention

  11. Directory Services • Most tools • High visibility • Even more important after transition to Active Directory • Major projects • Rules-based Distribution Lists • DLManager O'Reilly Open Source Convention

  12. Rules-based Distribution Lists • Examples lacking • Only creation shown • No concept of ‘update’ • Perl makes it easier • Easy to compare lists • Win32::OLE gives you access to ADSI O'Reilly Open Source Convention

  13. Rules-based Distribution Lists • Membership rules are in Perl syntax (($unit eq ‘DEPT’) && ($loc eq ‘City’)) • For each list… • Rule is eval’ed for each employee • Current membership compared to eval’ed membership • Adds/Deletes/Creates as necessary O'Reilly Open Source Convention

  14. DLManager • Requirements • Decommission ListServ on VM • Provide same functionality (80/20) • 2/3 already done • “Closed” lists – regular DLs • Automated lists – autodl.pl • “OPEN” lists – not available O'Reilly Open Source Convention

  15. DLManager • Available solutions lacking in one way or another • Microsoft’s EXLIST • Reddfish ListServer • NTP ListManager O'Reilly Open Source Convention

  16. DLManager • Major features • Actually USES the existing directory • Leverages security • Written in Perl • PerlCtrl – part of Perl Development Kit from ActiveState O'Reilly Open Source Convention

  17. DLManager • Sample code • Demo O'Reilly Open Source Convention

  18. Exchange 2000/Active Directory • MAJOR changes/improvements • Directory • NT Account (SAM)/Exchange Directory consolidation • Distribution List = Security Group + mail • Extensible Schema O'Reilly Open Source Convention

  19. Exchange 2000/Active Directory • Information Store • IFS – ‘cd’ into your mailbox! • WebDAV • XML • Store Events/Sinks • Synchronous events • More robust O'Reilly Open Source Convention

  20. Conclusion • Currently updating code for Windows2000 Active Directory and Exchange2000 • Code available from me • Rick.Tatem@sas.com • PerlCtrl available as part of Perl Development Kit from ActiveState • Q&A… Thank you! O'Reilly Open Source Convention

More Related