* add reply-to: header to mails sent to room list recipients
authorWilfried Göesgens <willi@citadel.org>
Sun, 11 Jul 2010 22:09:08 +0000 (22:09 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 11 Jul 2010 22:09:08 +0000 (22:09 +0000)
citadel/modules/network/serv_network.c
citadel/msgbase.c
citadel/techdoc/hack.txt

index b3d3d4617300430a06a41abc62813c794fa1885a..e89f26eec7b78c03e21d0efe98a82a877a0fffd1 100644 (file)
@@ -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']);
index 8f13a44d9f8563c1b1f89eef9f2c0821e60fc21d..fc81c03bdac3c7eff96328ed1f1636fc4bd67782 100644 (file)
@@ -1891,6 +1891,9 @@ void OutputRFC822MsgHeaders(
                                        }
                                }
                        }
+                       else if (i == 'K') {
+                               cprintf("Reply-To: <%s>%s", mptr, nl);
+                       }
                        if (mptr != mpptr)
                                free (mptr);
                }
index bf6715c5e325e747519d4f617a521e75df35f9f5..769e563bdbc47359d11e424db845bb6c313b66f9 100644 (file)
@@ -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.