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:[EMAIL PROTECTED] 
> 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" <[EMAIL PROTECTED]> 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.

Reply via email to