]> andersk Git - moira.git/commitdiff
Handle mail routing for users with no pobox.
authorzacheiss <zacheiss>
Wed, 2 Sep 2009 19:17:35 +0000 (19:17 +0000)
committerzacheiss <zacheiss>
Wed, 2 Sep 2009 19:17:35 +0000 (19:17 +0000)
incremental/ldap/winad.c

index 7520d048cfa833de3639fbf43919807b0b6a00df..fa6f3ea54b118dc2fe71a8f9873fbb4297835d53 100755 (executable)
@@ -4346,6 +4346,20 @@ int user_update(LDAP *ldap_handle, char *dn_path, char *user_name,
                          user_name, ldap_err2string(rc));
              }
            }
+       } else if(rc==MR_NO_MATCH) {
+         
+         n = 0;
+         ADD_ATTR("mailRoutingAddress", mail_routing_v, LDAP_MOD_REPLACE);
+         mods[n] = NULL;
+         rc = ldap_modify_s(ldap_handle, distinguished_name, mods);
+         
+         if (rc == LDAP_ALREADY_EXISTS || rc == LDAP_TYPE_OR_VALUE_EXISTS)
+           rc = LDAP_SUCCESS;
+
+         if(rc)
+           com_err(whoami, 0, 
+                   "Unable to set the mailRoutingAddress for %s : %s",
+                   user_name, ldap_err2string(rc));
        }
       moira_disconnect();
     }
This page took 0.042527 seconds and 5 git commands to generate.