Once the mailbox is deleted (i.e. the Active Directory account is disassociated from 
the Information Store object), then "mailenabled" is just a function of the Active 
Directory, not Exchange.  To be mail-enabled just means that the following attributes 
are defined:

mail
legacyExchangeDN
proxyAddresses (SMTP and X.400)
textEncodedORAddress (X.400 address)
mailnickname
mAPIRecipient (set to FALSE. TRUE means a mailbox)
targetAddresss
msExchPoliciesIncluded (The GUIDs for the Recipient Update Service - RUS - policies)

That should do it since the Recipient Update Service should take care of the rest.

Take a look at the Q articles regarding the Recipient Update Service. It's the service 
that updates attributes on mail(box)-enabled objects.

You could use ADSI or LDAP at that point. Just depends what your most comfortable with.


Rick
---
Rick Tatem
SAS Institute

-----Original Message-----
From: Peter A. Peterson II [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 4:34 PM
To: [EMAIL PROTECTED]
Subject: MailEnable with Perl on win32?


I work for a small university in Chicago, and am what I'd call a
movice perl coder -- that's a medium novice.

Anyway, our campus community is pretty well split between commuters
and on campus students. And, since everyone's getting so net-saavy
these days, many students come to school with email accounts that they
already use regularly (hotmail, yahoo, etc.). We'd like to allow them
to use a CGI to change their "on campus email address" to whatever
their current "primary address" is. 

This is the sort of overview of how we were thinking about doing it --
at least, this is how it's done in the GUI (Exchange 2000):

1. Delete their mailbox.
2. MailEnable the AD user with the off campus address.
([EMAIL PROTECTED])

This allows their user to still show in the Global Address List, but
have the address associated with it point off campus.

3. Add a secondary SMTP address for North Park (the school) ([EMAIL PROTECTED])
so that if someone sends email to that address it will be redirected
to their s00perwebmail account.

We're looking at doing this with either Perl or with VB -- I'm gunning
for Perl myself. So I did some research into modules like
Win32::Exchange to see what stuff was already modularized, and as far
as I can tell, I can do the mailbox deletion and adding the secondary
SMTP through that module, but I don't see a method for doing the
MailEnable and adding the external address.

Am I overlooking something? Or does this have to be done with the OLE
calls? If someone could point me in the right direction on this, I'd
be grateful.

Thanks,

Peter

-- 
Peter A. Peterson II, technician and musician.
---=[ http://tastytronic.net/~pedro/ ]=---
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to