projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2d01d13
)
The server now uses its own knowledge of local domains to set or clear the 'locl...
author
Art Cancro
<ajc@citadel.org>
Mon, 14 Dec 2020 05:49:07 +0000
(
00:49
-0500)
committer
Art Cancro
<ajc@citadel.org>
Mon, 14 Dec 2020 05:49:07 +0000
(
00:49
-0500)
citadel/msgbase.c
patch
|
blob
|
history
diff --git
a/citadel/msgbase.c
b/citadel/msgbase.c
index 8ebb91911d23086cb8cc1e6c343bcbda1e0bdd5f..0447013393225ae078ac147cc035b5748ad2278e 100644
(file)
--- a/
citadel/msgbase.c
+++ b/
citadel/msgbase.c
@@
-1689,10
+1689,7
@@
int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */
}
}
-void OutputCtdlMsgHeaders(
- struct CtdlMessage *TheMessage,
- int do_proto) /* do Citadel protocol responses? */
-{
+void OutputCtdlMsgHeaders(struct CtdlMessage *TheMessage, int do_proto) {
int i;
char buf[SIZ];
char display_name[256];
int i;
char buf[SIZ];
char display_name[256];
@@
-1725,23
+1722,29
@@
void OutputCtdlMsgHeaders(
eMsgField Field;
Field = FieldOrder[i];
if (Field != eMesageText) {
eMsgField Field;
Field = FieldOrder[i];
if (Field != eMesageText) {
- if ( (!CM_IsEmpty(TheMessage, Field))
- && (msgkeys[Field] != NULL) ) {
- if ((Field == eenVelopeTo) ||
- (Field == eRecipient) ||
- (Field == eCarbonCopY)) {
+ if ( (!CM_IsEmpty(TheMessage, Field)) && (msgkeys[Field] != NULL) ) {
+ if ((Field == eenVelopeTo) || (Field == eRecipient) || (Field == eCarbonCopY)) {
sanitize_truncated_recipient(TheMessage->cm_fields[Field]);
}
if (Field == eAuthor) {
sanitize_truncated_recipient(TheMessage->cm_fields[Field]);
}
if (Field == eAuthor) {
- if (do_proto)
cprintf("%s=%s\n",
- msgkeys[Field],
- display_name);
+ if (do_proto)
{
+ cprintf("%s=%s\n", msgkeys[Field], display_name);
+ }
}
/* Masquerade display name if needed */
else {
if (do_proto) {
cprintf("%s=%s\n", msgkeys[Field], TheMessage->cm_fields[Field]);
}
}
/* Masquerade display name if needed */
else {
if (do_proto) {
cprintf("%s=%s\n", msgkeys[Field], TheMessage->cm_fields[Field]);
}
+ }
+ /* Give the client a hint about whether the message originated locally */
+ if (Field == erFc822Addr) {
+ if (IsDirectory(TheMessage->cm_fields[Field] ,0)) {
+ cprintf("locl=yes\n"); // message originated locally.
+ }
+
+
+
}
}
}
}
}
}
@@
-2126,7
+2129,7
@@
int CtdlOutputPreLoadedMsg(
/* Tell the client which format type we're using. */
if ( (mode == MT_CITADEL) && (do_proto) ) {
/* Tell the client which format type we're using. */
if ( (mode == MT_CITADEL) && (do_proto) ) {
- cprintf("type=%d\n", TheMessage->cm_format_type);
+ cprintf("type=%d\n", TheMessage->cm_format_type);
// Tell the client which format type we're using.
}
/* nhdr=yes means that we're only displaying headers, no body */
}
/* nhdr=yes means that we're only displaying headers, no body */
@@
-2137,9
+2140,9
@@
int CtdlOutputPreLoadedMsg(
cprintf("nhdr=yes\n");
}
cprintf("nhdr=yes\n");
}
- if ((mode == MT_CITADEL) || (mode == MT_MIME))
+ if ((mode == MT_CITADEL) || (mode == MT_MIME))
{
OutputCtdlMsgHeaders(TheMessage, do_proto);
OutputCtdlMsgHeaders(TheMessage, do_proto);
-
+ }
/* begin header processing loop for RFC822 transfer format */
strcpy(suser, "");
/* begin header processing loop for RFC822 transfer format */
strcpy(suser, "");