$Log$
+ Revision 580.43 2001/09/17 23:55:45 ajc
+ * Support for IGnet routing (not tested)
+
Revision 580.42 2001/09/16 05:44:51 ajc
* serv_smtp.c: instead of doubling delivery retry times unbounded, set a
maximum retry time of SMTP_RETRY_MAX (currently set to 12 hours)
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
}
}
}
+ phree(sermsg.ser);
}
}
struct usersupp tempUS;
char recp[SIZ];
char target_room[ROOMNAMELEN];
+ struct ser_ret sermsg;
+ char *oldpath = NULL;
+ char filename[SIZ];
+ FILE *fp;
/* Set default target room to trash */
strcpy(target_room, TWITROOM);
if (msg->cm_fields['D'] != NULL) {
if (strcasecmp(msg->cm_fields['D'], config.c_nodename)) {
+ /* route the message */
if (is_valid_node(NULL, msg->cm_fields['D']) == 0) {
- /* FIXME route the message, stupid */
-
-
+ /* prepend our node to the path */
+ if (msg->cm_fields['P'] != NULL) {
+ oldpath = msg->cm_fields['P'];
+ msg->cm_fields['P'] = NULL;
+ }
+ else {
+ oldpath = strdoop("unknown_user");
+ }
+ msg->cm_fields['P'] =
+ mallok(strlen(oldpath) + SIZ);
+ sprintf(msg->cm_fields['P'], "%s!%s",
+ config.c_nodename, oldpath);
+ phree(oldpath);
+
+ /* serialize the message */
+ serialize_message(&sermsg, msg);
+
+ /* now send it */
+ sprintf(filename,
+ "./network/spoolout/%s",
+ msg->cm_fields['D']);
+ fp = fopen(filename, "ab");
+ if (fp != NULL) {
+ fwrite(sermsg.ser,
+ sermsg.len, 1, fp);
+ fclose(fp);
+ }
+ phree(sermsg.ser);
+ CtdlFreeMessage(msg);
+ return;
}
else { /* invalid destination node name */