$Log$
+ Revision 590.56 2002/01/11 04:59:00 ajc
+ * Finished most of the work for the Global Address Book.
+
Revision 590.55 2002/01/11 04:37:03 ajc
* More code for the Global Address Book
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
}
}
key[keylen++] = 0;
+
+ lprintf(9, "Directory key is <%s>\n", key);
}
striplt(domain);
h = CtdlHostAlias(domain);
+ lprintf(9, "IsDirectory(%s)\n", domain);
if ( (h == hostalias_localhost) || (h == hostalias_directory) ) {
+ lprintf(9, " ...yes\n");
return(1);
}
else {
+ lprintf(9, " ...no\n");
return(0);
}
}
struct cdbdata *cdbrec;
char key[SIZ];
+ lprintf(9, "CtdlDirectoryLookup(%s)\n", internet_addr);
+
if (IsDirectory(internet_addr) == 0) return(-1);
directory_key(key, internet_addr);
if (cdbrec != NULL) {
safestrncpy(target, cdbrec->ptr, SIZ);
cdb_free(cdbrec);
+ lprintf(9, "Looked up as <%s>\n", target);
return(0);
}
+ lprintf(9, "Lookup failed\n");
return(-1);
}
strcpy(name, bbb);
}
fclose(fp);
+
+ /* Hit the Global Address Book */
+ if (CtdlDirectoryLookup(aaa, name) == 0) {
+ strcpy(name, aaa);
+ }
+
lprintf(7, "Mail is being forwarded to %s\n", name);
/* Change "user @ xxx" to "user" if xxx is an alias for this host */
}
}
- /* Hit the Global Address Book */
- if (CtdlDirectoryLookup(aaa, name) == 0) {
- strcpy(name, aaa);
- }
-
/* determine local or remote type, see citadel.h */
at = haschar(name, '@');
if (at == 0) return(MES_LOCAL); /* no @'s - local address */
strcpy(recp, &argbuf[3]);
striplt(recp);
+ stripallbut(recp, '<', '>');
alias(recp);
-
cvt = convert_internet_address(user, node, recp);
snprintf(recp, sizeof recp, "%s@%s", user, node);
lprintf(9, "cvt=%d, citaddr=<%s@%s>\n", cvt, user, node);