From 436e37f800487ea58343ba015299869d216269d2 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 13 Dec 2020 19:29:31 -0500 Subject: [PATCH] The 'N' (Node) field in the message database has been resurrected, this time as a flag to indicate that a message originated on the local system, as opposed to an inbound email or some other nonlocal source. This field is not populated yet. If old messages with CitaNet remote nodes are discovered by the new code, the desired behavior should still work (suppress display of RFC822 email addresses) --- citadel/docs/databaselayout.txt | 9 ++++++--- citadel/msgbase.c | 4 +++- citadel/server.h | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/citadel/docs/databaselayout.txt b/citadel/docs/databaselayout.txt index 7dbcf1da3..97c14f8d5 100644 --- a/citadel/docs/databaselayout.txt +++ b/citadel/docs/databaselayout.txt @@ -221,7 +221,7 @@ reaches zero. | BYTE | Enum | NW | Mnemonic | Enum / Comments |-------|-------------------|------|----------------|--------------------------------------------------------- -| A | eAuthor | from | Author | Name of originator of the message. +| A | eAuthor | from | Author | The display name of the Author of the message. | B | eBig_message | | Big message | This is a flag which indicates that the message is | | | | | big, and Citadel is storing the body in a separate | | | | | record. You will never see this field because the @@ -233,8 +233,8 @@ reaches zero. | | | | | message should be deleted. If there exist any messages | | | | | with the same Exclusive ID that are *newer*, then this | | | | | message should be dropped. -| F | erFc822Addr | rfca | rFc822 address | For Internet mail, this is the delivery address of the -| | | | | message author. +| F | erFc822Addr | rfca | rFc822 address | email address or user principal name of the message +| | | | | author. | I | emessageId | msgn | Message ID | An RFC822-compatible message ID for this message. | | | | | | J | eJournal | jrnl | Journal | The presence of this field indicates that the message @@ -245,6 +245,9 @@ reaches zero. | L | eListID | list | List-ID | Mailing list identification, as per RFC 2919 | M | eMesageText | text | Message Text | Normal ASCII, newlines seperated by CR's or LF's, | | | | | null terminated as always. +| N | eOrigLocal | locl | Is-Local | The presence of this field indicates that the message +| | | | | originated on the local Citadel node, not as an inbound +| | | | | email or some other outside source. | O | eOriginalRoom | room | Room | Room of origin. | P | eMessagePath | path | Path | Complete path of message, as in the UseNet news | | | | | standard. A user should be able to send Internet mail diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 7e6d0650e..870a83a03 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -61,7 +61,7 @@ char *msgkeys[] = { "rep2", // K -> eReplyTo "list", // L -> eListID "text", // M -> eMesageText - NULL, // N (formerly used as eNodeName) + "locl", // N -> eOrigLocal "room", // O -> eOriginalRoom "path", // P -> eMessagePath NULL, // Q @@ -113,6 +113,7 @@ eMsgField FieldOrder[] = { eOriginalRoom, eRecipient , /* Semi-important fields */ + eOrigLocal , eBig_message , eExclusiveID , eWeferences , @@ -1856,6 +1857,7 @@ void OutputRFC822MsgHeaders( case eSuppressIdx: case eExtnotify: case eVltMsgNum: + case eOrigLocal: /* these don't map to mime message headers. */ break; } diff --git a/citadel/server.h b/citadel/server.h index 9215d2e7e..bac82875c 100644 --- a/citadel/server.h +++ b/citadel/server.h @@ -317,6 +317,7 @@ typedef enum _MsgField { eReplyTo = 'K', eListID = 'L', eMesageText = 'M', + eOrigLocal = 'N', eOriginalRoom = 'O', eMessagePath = 'P', eRecipient = 'R', -- 2.30.2