From 7fca9092b7674acfacbddf96c86fd8f4972be3ac Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sun, 11 Jul 2010 22:09:08 +0000 Subject: [PATCH] * add reply-to: header to mails sent to room list recipients --- citadel/modules/network/serv_network.c | 14 +++++++++++++- citadel/msgbase.c | 3 +++ citadel/techdoc/hack.txt | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/citadel/modules/network/serv_network.c b/citadel/modules/network/serv_network.c index b3d3d4617..e89f26eec 100644 --- a/citadel/modules/network/serv_network.c +++ b/citadel/modules/network/serv_network.c @@ -647,7 +647,19 @@ void network_spool_msg(long msgnum, void *userdata) { */ msg = CtdlFetchMessage(msgnum, 1); if (msg != NULL) { - + if (msg->cm_fields['V'] == NULL){ + /* local message, no enVelope */ + StrBuf *Buf; + Buf = NewStrBuf(); + StrBufAppendBufPlain(Buf, msg->cm_fields['O'], -1, 0); + StrBufAppendBufPlain(Buf, HKEY("@"), 0); + StrBufAppendBufPlain(Buf, config.c_fqdn, -1, 0); + + msg->cm_fields['K'] = SmashStrBuf(&Buf); + } + else { + msg->cm_fields['K'] = strdup (msg->cm_fields['V']); + } /* Set the 'List-ID' header */ if (msg->cm_fields['L'] != NULL) { free(msg->cm_fields['L']); diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 8f13a44d9..fc81c03bd 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -1891,6 +1891,9 @@ void OutputRFC822MsgHeaders( } } } + else if (i == 'K') { + cprintf("Reply-To: <%s>%s", mptr, nl); + } if (mptr != mpptr) free (mptr); } diff --git a/citadel/techdoc/hack.txt b/citadel/techdoc/hack.txt index bf6715c5e..769e563bd 100644 --- a/citadel/techdoc/hack.txt +++ b/citadel/techdoc/hack.txt @@ -253,6 +253,7 @@ J Journal The presence of this field indicates that the message is disqualified from being journaled, perhaps because it is itself a journalized message and we wish to avoid double journaling. +K Reply-To the Reply-To header for mailinglist outbound messages L List-ID Mailing list identification, as per RFC 2919 M Message Text Normal ASCII, newlines seperated by CR's or LF's, null terminated as always. -- 2.30.2