]> andersk Git - moira.git/blobdiff - incremental/ldap/winad.c
Handle mail routing for users with no pobox.
[moira.git] / 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.036182 seconds and 4 git commands to generate.