From 156a9972863bd789ba11c77c759d579ea415a17d Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 14 Feb 2021 16:12:40 -0500 Subject: [PATCH] Delivery of messages to mailing list recipients is complete. --- citadel/modules/listdeliver/serv_listdeliver.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/citadel/modules/listdeliver/serv_listdeliver.c b/citadel/modules/listdeliver/serv_listdeliver.c index f82a8076c..4ceb75a65 100644 --- a/citadel/modules/listdeliver/serv_listdeliver.c +++ b/citadel/modules/listdeliver/serv_listdeliver.c @@ -56,6 +56,7 @@ void listdeliver_do_msg(long msgnum, void *userdata) { if (!ld) return; char buf[SIZ]; char *ch; + char bounce_to[256]; ld->msgnum = msgnum; if (msgnum <= 0) return; @@ -76,13 +77,6 @@ void listdeliver_do_msg(long msgnum, void *userdata) { } CM_SetField(TheMessage, eReplyTo, buf, strlen(buf)); - // Errors-to: should be set to our Aide room so we see the notifications. - - - - - - // With that out of the way, let's figure out who this message needs to be sent to. char *recipients = malloc(strlen(ld->netconf)); if (recipients) { @@ -104,10 +98,16 @@ void listdeliver_do_msg(long msgnum, void *userdata) { strcat(recipients, &buf[11]); } } + + // Where do we want bounces and other noise to be sent? Certainly not to the list members! + snprintf(bounce_to, sizeof bounce_to, "room_aide@%s", CtdlGetConfigStr("c_fqdn")); + + // Now submit the message struct recptypes *valid = validate_recipients(recipients, NULL, 0); if (valid) { - long new_msgnum = CtdlSubmitMsg(TheMessage, valid, ""); - syslog(LOG_DEBUG, "listdeliver: original message <%ld> is now <%ld> outgoing to the list", msgnum, new_msgnum); + valid->bounce_to = strdup(bounce_to); + valid->envelope_from = strdup(bounce_to); + CtdlSubmitMsg(TheMessage, valid, ""); free_recipients(valid); } } -- 2.30.2