int colonpos = (-1);
int processed = 0;
char buf[256];
- char *user, *node, *name;
+ char user[1024];
+ char node[1024];
+ char name[1024];
+ char addr[1024];
time_t parsed_date;
rfc822 = msg->cm_fields['M']; /* M field contains rfc822 text */
}
else if (!strcasecmp(key, "From")) {
- user = mallok(1024);
- node = mallok(1024);
- name = mallok(1024);
process_rfc822_addr(value, user, node, name);
lprintf(9, "Converted to <%s@%s> (%s)\n", user, node, name);
+ sprintf(addr, "%s@%s", user, node);
if (msg->cm_fields['A'] == NULL)
- msg->cm_fields['A'] = user;
- else
- phree(user);
- if (msg->cm_fields['N'] == NULL)
- msg->cm_fields['N'] = node;
- else
- phree(node);
- if (msg->cm_fields['H'] == NULL)
- msg->cm_fields['H'] = name;
- else
- phree(name);
+ msg->cm_fields['A'] = strdoop(name);
+ processed = 1;
+ if (msg->cm_fields['F'] == NULL)
+ msg->cm_fields['F'] = strdoop(addr);
processed = 1;
}
}
if (!struncmp(buf,"subj=",5))
strcpy(m_subject,&buf[5]);
+
+ if (!struncmp(buf,"rfca=",5)) {
+ color(DIM_WHITE);
+ printf("<");
+ color(BRIGHT_BLUE);
+ printf("%s",&buf[5]);
+ color(DIM_WHITE);
+ printf("> ");
+ }
if ((!struncmp(buf,"hnod=",5))
&& (strucmp(&buf[5],serv_info.serv_humannode))) {
color(DIM_WHITE);
"from",
"", "", "",
"exti",
- "", "",
+ "rfca",
+ "",
"hnod",
"msgn",
"", "", "",
/* buffers needed for RFC822 translation */
char suser[256];
char luser[256];
+ char fuser[256];
char snode[256];
char lnode[256];
char mid[256];
strcpy(suser, "");
strcpy(luser, "");
+ strcpy(fuser, "");
strcpy(snode, NODENAME);
strcpy(lnode, HUMANNODE);
if (mode == MT_RFC822) {
}
cprintf("Message-ID: <%s@%s>%s", mid, snode, nl);
PerformUserHooks(luser, (-1L), EVT_OUTPUTMSG);
- cprintf("From: %s@%s (%s)%s", suser, snode, luser, nl);
+
+ if (strlen(fuser) > 0) {
+ cprintf("From: %s (%s)%s", fuser, luser, nl);
+ }
+ else {
+ cprintf("From: %s@%s (%s)%s", suser, snode, luser, nl);
+ }
+
cprintf("Organization: %s%s", lnode, nl);
}
/* Preferred field order */
-/* ********* Important fields */
-/* **************** Semi-important fields */
+/* ********** Important fields */
+/* *************** Semi-important fields */
/* * Message text (MUST be last) */
-#define FORDER "IPTAONHRDBCEFGJKLQSUVWXYZM"
+#define FORDER "IPTAFONHRDBCEGJKLQSUVWXYZM"
message should be deleted. If there exist any messages
with the same Extended ID that are *newer*, then this
message should be dropped.
+F rFc821 address For Internet mail, this is the delivery address of the
+ message author.
G Gateway domain This field is provided solely for the implementation
of C86Net gateways, and holds the C86Net domain of
the system this message originated on. Unless you're