projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d472cd6
)
* More addressing hacks
author
Art Cancro
<ajc@citadel.org>
Wed, 16 Feb 2000 04:42:02 +0000
(
04:42
+0000)
committer
Art Cancro
<ajc@citadel.org>
Wed, 16 Feb 2000 04:42:02 +0000
(
04:42
+0000)
citadel/internet_addressing.c
patch
|
blob
|
history
citadel/messages.c
patch
|
blob
|
history
citadel/msgbase.c
patch
|
blob
|
history
citadel/server.h
patch
|
blob
|
history
citadel/techdoc/hack.txt
patch
|
blob
|
history
diff --git
a/citadel/internet_addressing.c
b/citadel/internet_addressing.c
index 94c2e8fcece2ad45f09fd18570b6013478ecc61c..e1878423986b1efbc8898c41d6719208e9c38d2a 100644
(file)
--- a/
citadel/internet_addressing.c
+++ b/
citadel/internet_addressing.c
@@
-367,7
+367,10
@@
int convert_field(struct CtdlMessage *msg, int beg, int end) {
int colonpos = (-1);
int processed = 0;
char buf[256];
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 */
time_t parsed_date;
rfc822 = msg->cm_fields['M']; /* M field contains rfc822 text */
@@
-404,23
+407,14
@@
int convert_field(struct CtdlMessage *msg, int beg, int end) {
}
else if (!strcasecmp(key, "From")) {
}
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);
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)
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;
}
processed = 1;
}
diff --git
a/citadel/messages.c
b/citadel/messages.c
index a396be0d17f1d1f76a06f8ba579748ce99dead01..aea57cde6825d638e38f442d373473d97e13ae2f 100644
(file)
--- a/
citadel/messages.c
+++ b/
citadel/messages.c
@@
-403,6
+403,15
@@
int read_message(long int num, char pagin) /* Read a message from the server */
}
if (!struncmp(buf,"subj=",5))
strcpy(m_subject,&buf[5]);
}
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);
if ((!struncmp(buf,"hnod=",5))
&& (strucmp(&buf[5],serv_info.serv_humannode))) {
color(DIM_WHITE);
diff --git
a/citadel/msgbase.c
b/citadel/msgbase.c
index c0982109108eb5aaa2751dc5b839fb8d8d45822c..6b4e645a434e5cf04e85a7c3f6cfe3c8ea5c31d8 100644
(file)
--- a/
citadel/msgbase.c
+++ b/
citadel/msgbase.c
@@
-49,7
+49,8
@@
char *msgkeys[] = {
"from",
"", "", "",
"exti",
"from",
"", "", "",
"exti",
- "", "",
+ "rfca",
+ "",
"hnod",
"msgn",
"", "", "",
"hnod",
"msgn",
"", "", "",
@@
-759,6
+760,7
@@
int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */
/* buffers needed for RFC822 translation */
char suser[256];
char luser[256];
/* buffers needed for RFC822 translation */
char suser[256];
char luser[256];
+ char fuser[256];
char snode[256];
char lnode[256];
char mid[256];
char snode[256];
char lnode[256];
char mid[256];
@@
-897,6
+899,7
@@
int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */
strcpy(suser, "");
strcpy(luser, "");
strcpy(suser, "");
strcpy(luser, "");
+ strcpy(fuser, "");
strcpy(snode, NODENAME);
strcpy(lnode, HUMANNODE);
if (mode == MT_RFC822) {
strcpy(snode, NODENAME);
strcpy(lnode, HUMANNODE);
if (mode == MT_RFC822) {
@@
-943,7
+946,14
@@
int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */
}
cprintf("Message-ID: <%s@%s>%s", mid, snode, nl);
PerformUserHooks(luser, (-1L), EVT_OUTPUTMSG);
}
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);
}
cprintf("Organization: %s%s", lnode, nl);
}
diff --git
a/citadel/server.h
b/citadel/server.h
index 757858aad2d7e26065ff81be201d4f799ef0e9c3..10a6f853bd1f8f0064236f54ef22d567338d8b0c 100644
(file)
--- a/
citadel/server.h
+++ b/
citadel/server.h
@@
-413,7
+413,7
@@
struct ser_ret {
/* Preferred field order */
/* Preferred field order */
-/* *********
Important fields */
-/*
*
*************** Semi-important fields */
+/* *********
*
Important fields */
+/*
*************** Semi-important fields */
/* * Message text (MUST be last) */
/* * Message text (MUST be last) */
-#define FORDER "IPTA
ONHRDBCEF
GJKLQSUVWXYZM"
+#define FORDER "IPTA
FONHRDBCE
GJKLQSUVWXYZM"
diff --git
a/citadel/techdoc/hack.txt
b/citadel/techdoc/hack.txt
index 6218a80a47245540f72e98cd0f13817b209425ca..4028ccecc9e166d1195cb387fda811a724819c2f 100644
(file)
--- a/
citadel/techdoc/hack.txt
+++ b/
citadel/techdoc/hack.txt
@@
-90,6
+90,8
@@
E Extended ID A persistent alphanumeric Message ID used for
message should be deleted. If there exist any messages
with the same Extended ID that are *newer*, then this
message should be dropped.
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
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