+ /* canonicalize string if necessary */
+ if (memberstruct->type == M_STRING &&
+ (p = strchr(memberstruct->name, '@'))) {
+ char *host = canonicalize_hostname(strsave(++p));
+ static char **mailhubs = NULL;
+ char *argv[4];
+ int i, collect();
+
+ if (!mailhubs) {
+ argv[0] = "mailhub";
+ argv[1] = "TYPE";
+ argv[2] = "*";
+ mailhubs = (char **)malloc(sizeof(char *));
+ mailhubs[0] = NULL;
+ status = mr_query("get_alias", 3, argv, collect,
+ (char *)&mailhubs);
+ if (status != MR_SUCCESS && status != MR_NO_MATCH) {
+ com_err(whoami, status,
+ " while reading list of MAILHUB servers");
+ mailhubs[0] = NULL;
+ }
+ }
+ for (i = 0; p = mailhubs[i]; i++) {
+ if (!strcasecmp(p, host)) {
+ host = strsave(memberstruct->name);
+ *(strchr(memberstruct->name, '@')) = 0;
+ memberstruct->type = M_ANY;
+ fprintf(stderr, "Warning: \"STRING:%s\" converted to \"%s\" because it is a local name.\n",
+ host, memberstruct->name);
+ break;
+ }
+ }
+ free(host);
+ }
+ /* now continue adding member */