projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2e0e7f9
)
Delivery of messages to mailing list recipients is complete.
author
Art Cancro
<ajc@citadel.org>
Sun, 14 Feb 2021 21:12:40 +0000
(16:12 -0500)
committer
Art Cancro
<ajc@citadel.org>
Sun, 14 Feb 2021 21:12:40 +0000
(16:12 -0500)
citadel/modules/listdeliver/serv_listdeliver.c
patch
|
blob
|
history
diff --git
a/citadel/modules/listdeliver/serv_listdeliver.c
b/citadel/modules/listdeliver/serv_listdeliver.c
index f82a8076ce3a0a3bba32d463cd9d6f2af0fd3735..4ceb75a657d8824be0e2ff83de526471d4c4ec7a 100644
(file)
--- 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;
if (!ld) return;
char buf[SIZ];
char *ch;
+ char bounce_to[256];
ld->msgnum = msgnum;
if (msgnum <= 0) return;
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));
}
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) {
// 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]);
}
}
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) {
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);
}
}
free_recipients(valid);
}
}