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


Reply via email to