SUB_ERROR)
return NULL;
info[L_MAILMAN_SERVER] = canonicalize_hostname(info[L_MAILMAN_SERVER]);
+
+ /* Change default owner */
+ strcpy(info[L_ACE_TYPE], "LIST");
+ strcpy(info[L_ACE_NAME], "mailman");
}
do {
free(info[L_ACE_NAME]);
info[L_ACE_NAME] = canon;
}
- if (GetTypeFromUser("What Type of Membership Administrator", "ace_type",
- &info[L_MEMACE_TYPE]) == SUB_ERROR)
- return NULL;
- if (strcasecmp(info[L_MEMACE_TYPE], "none"))
- {
- sprintf(temp_buf, "Which %s will be the membership administrator of this list: ",
- info[L_MEMACE_TYPE]);
- if (GetValueFromUser(temp_buf, &info[L_MEMACE_NAME]) == SUB_ERROR)
- return NULL;
- }
+
+ do {
+ if (GetTypeFromUser("What Type of Membership Administrator", "ace_type",
+ &info[L_MEMACE_TYPE]) == SUB_ERROR)
+ return NULL;
+ if (strcasecmp(info[L_MEMACE_TYPE], "none"))
+ {
+ sprintf(temp_buf, "Which %s will be the membership administrator of this list: ",
+ info[L_MEMACE_TYPE]);
+ if (GetValueFromUser(temp_buf, &info[L_MEMACE_NAME]) == SUB_ERROR)
+ return NULL;
+ }
+ else
+ {
+ Put_message("Setting the Membership Administrator of a Mailman list to 'NONE'");
+ Put_message("means no one will receive the list administrator password.");
+ if (YesNoQuestion("Do you really want to do this?", FALSE) == TRUE)
+ break;
+ }
+ } while ((!strcasecmp(info[L_MEMACE_TYPE], "none")) &&
+ atoi(info[L_MAILMAN]));
+
if (!strcasecmp(info[L_MEMACE_TYPE], "kerberos"))
{
char *canon;
ret_code = SUB_ERROR;
}
+ if (atoi(add_args[L_MAILMAN]))
+ {
+ char mailman_address[256], buf[1024];
+
+ status = do_mr_query("get_list_info", 1, add_args, StoreInfo, &elem);
+ if (status)
+ com_err(program_name, status, "while retrieving list information.");
+ else
+ {
+ strcpy(mailman_address, add_args[0]);
+ strcat(mailman_address, "@");
+ strcat(mailman_address, ((char **)elem->q_data)[L_MAILMAN_SERVER]);
+ sprintf(buf, "Add STRING %s to LIST %s", mailman_address,
+ add_args[0]);
+ if (YesNoQuestion(buf, TRUE) == TRUE)
+ {
+ char *args[3];
+ args[0] = add_args[0];
+ args[1] = "STRING";
+ args[2] = mailman_address;
+
+ status = do_mr_query("add_member_to_list", CountArgs(args), args,
+ NULL, NULL);
+ if (status)
+ com_err(program_name, status, "while adding member to list.");
+ }
+ }
+ }
+
FreeInfo(info);
return ret_code;
}