From: root Date: Wed, 22 Sep 2021 17:49:31 +0000 (-0400) Subject: Fixed a bug in the new aliasing code that broke mail to rooms with spaces in their... X-Git-Tag: v939~1 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=92e253b134162c8625814f032e8391f849b520c2 Fixed a bug in the new aliasing code that broke mail to rooms with spaces in their names. --- diff --git a/citadel/internet_addressing.c b/citadel/internet_addressing.c index 2e1dd06b4..429272586 100644 --- a/citadel/internet_addressing.c +++ b/citadel/internet_addressing.c @@ -624,12 +624,12 @@ struct recptypes *validate_recipients(char *supplied_recipients, const char *Rem if (!IsEmptyStr(ret->recp_room)) { strcat(ret->recp_room, "|"); } - strcat(ret->recp_room, &this_recp[5]); + strcat(ret->recp_room, CC->room.QRname); if (!IsEmptyStr(ret->recp_orgroom)) { strcat(ret->recp_orgroom, "|"); } - strcat(ret->recp_orgroom, org_recp); + strcat(ret->recp_orgroom, this_recp); } } diff --git a/citadel/modules/ctdlproto/serv_messages.c b/citadel/modules/ctdlproto/serv_messages.c index 11d61e946..af40c304b 100644 --- a/citadel/modules/ctdlproto/serv_messages.c +++ b/citadel/modules/ctdlproto/serv_messages.c @@ -639,12 +639,9 @@ void cmd_ent0(char *entargs) { } free(all_recps); - if ((valid != NULL) && (valid->num_room == 1) && !IsEmptyStr(valid->recp_orgroom)) - { - /* posting into an ML room? set the envelope from - * to the actual mail address so others get a valid - * reply-to-header. - */ + // posting into a mailing list room? set the envelope from + // to the actual mail address so others get a valid reply-to-header. + if ((valid != NULL) && (valid->num_room == 1) && !IsEmptyStr(valid->recp_orgroom)) { CM_SetField(msg, eenVelopeTo, valid->recp_orgroom, strlen(valid->recp_orgroom)); }