Fixed a bug in the new aliasing code that broke mail to rooms with spaces in their...
authorroot <root@dev.citadel.org>
Wed, 22 Sep 2021 17:49:31 +0000 (13:49 -0400)
committerroot <root@dev.citadel.org>
Wed, 22 Sep 2021 17:49:31 +0000 (13:49 -0400)
citadel/internet_addressing.c
citadel/modules/ctdlproto/serv_messages.c

index 2e1dd06..4292725 100644 (file)
@@ -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);
        
                                        }
                                }
index 11d61e9..af40c30 100644 (file)
@@ -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));
        }