develooper Front page | perl.ldap | Postings from February 2007

RE: Add SMTP address to proxyAddresses in AD

Thread Previous
From:
Giuoco, Aaron
Date:
February 19, 2007 23:49
Subject:
RE: Add SMTP address to proxyAddresses in AD
Message ID:
1650BBF6A435B941AA846A60D4B99C5502407811@postoffice.corpnet.singlebuoy.com
Understood.  I did figure out a different way to do it.

Rather than try to use ADD to append to the list, I just dumped the
proxyAddresses list into an array, added my new email address to the
array, then pushed the entire array back into the proxyAddresses
property using REPLACE.  That worked for some reason.

AG

> -----Original Message-----
> From: Chris Ridd [mailto:chrisridd@mac.com] 
> Sent: Saturday, February 17, 2007 1:00 AM
> To: Giuoco, Aaron; perl-ldap@perl.org
> Subject: Re: Add SMTP address to proxyAddresses in AD
> 
> On 16/2/07 4:50, "Giuoco, Aaron" <AGiuoco@atlantia.com> wrote:
> 
> > Hi LDAP list,
> > 
> > I seem to be having a problem adding SMTP addresses to the 
> > proxyAddresses attribute.  We are using Windows 2003 domain 
> > controllers and have a Windows 2003 server running Exchange 
> 2003 as our mail server.
> > 
> > Below is function I have written for adding and SMTP 
> address to an AD 
> > account.
> > 
> > 
> > 
> > sub enterNewEmail {
> > my $ldapConn = shift;
> > my $entry = shift;
> > my $newEmail = shift;
> > 
> > if ($entry and $newEmail) {
> > my $message = $ldapConn->modify($entry->dn(), add => { 
> > 'proxyAddresses' => "smtp:" . $newEmail }); if 
> ($message->code == 0) { 
> > return 1; } else { print "Error adding email address $newEmail: " .
> > $message->error() . "\n";
> > return undef;
> > }
> > } else {
> > return undef;
> > }
> > }
> > 
> > 
> > 
> > The odd thing is that this function never returns errors (it always 
> > returns 1).
> 
> You might be better off asking on an AD-specific list, since 
> AD is not /really/ an LDAP server.
> 
> Cheers,
> 
> Chris
> 
> 
> 

----------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.  If you are not the intended recipient, please telephone or Email the sender and delete this message and any attachment from your system.  If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About