Re-ordered the sequence of checking email addresses against valid system
authorDave West <davew@uncensored.citadel.org>
Mon, 17 Mar 2008 23:35:42 +0000 (23:35 +0000)
committerDave West <davew@uncensored.citadel.org>
Mon, 17 Mar 2008 23:35:42 +0000 (23:35 +0000)
addresses. This allows us to have a GAB entry for rooms and allows
messages originating internally to be addressed to a room.
For the GAB lookup to work as expected the email address for the room
must be simply room_roomname without the @domain. If the domain part is
included the aliasing routines will translate it into the address of the
person who created the GAB entry.
This should fix bug #324.

citadel/Makefile.in
citadel/msgbase.c

index bd104403b476dd062c2f069fc134a0a622b03886..98b88ce4ce68836b2a9a8a0eb5c1680c620648d6 100644 (file)
@@ -52,14 +52,14 @@ CFLAGS=@CFLAGS@ -I ./include/
 CPPFLAGS=@CPPFLAGS@ -I. -I ./include/
 DATABASE=@DATABASE@
 DEFS=@DEFS@
-LDFLAGS=@LDFLAGS@  -Wl,--no-undefined -Wl,--as-needed
+LDFLAGS=@LDFLAGS@  -Wl,--no-undefined
 LIBS=@LIBS@
 LIBOBJS=@LIBOBJS@
 INSTALL=@INSTALL@
 INSTALL_DATA=@INSTALL_DATA@
 RESOLV=@RESOLV@
 SHELL=/bin/sh
-SERVER_LDFLAGS=@SERVER_LDFLAGS@  -Wl,--no-undefined -Wl,--as-needed
+SERVER_LDFLAGS=@SERVER_LDFLAGS@  -Wl,--no-undefined 
 SERVER_LIBS=@SERVER_LIBS@
 SETUP_LIBS=@SETUP_LIBS@
 YACC=@YACC@
index cce03b3c4954c5e1f50327d296d9b063c418c356..678bec452093031174487b213e99712a15c0dff1 100644 (file)
@@ -3308,22 +3308,6 @@ struct recptypes *validate_recipients(char *supplied_recipients,
                                        }
                                        strcat(ret->recp_room, this_recp);
                                }
-                               else if (getuser(&tempUS, this_recp) == 0) {
-                                       ++ret->num_local;
-                                       strcpy(this_recp, tempUS.fullname);
-                                       if (!IsEmptyStr(ret->recp_local)) {
-                                               strcat(ret->recp_local, "|");
-                                       }
-                                       strcat(ret->recp_local, this_recp);
-                               }
-                               else if (getuser(&tempUS, this_recp_cooked) == 0) {
-                                       ++ret->num_local;
-                                       strcpy(this_recp, tempUS.fullname);
-                                       if (!IsEmptyStr(ret->recp_local)) {
-                                               strcat(ret->recp_local, "|");
-                                       }
-                                       strcat(ret->recp_local, this_recp);
-                               }
                                else if ( (!strncasecmp(this_recp, "room_", 5))
                                      && (!getroom(&tempQR, &this_recp_cooked[5])) ) {
 
@@ -3354,6 +3338,22 @@ struct recptypes *validate_recipients(char *supplied_recipients,
                                        CC->room = tempQR2;
 
                                }
+                               else if (getuser(&tempUS, this_recp) == 0) {
+                                       ++ret->num_local;
+                                       strcpy(this_recp, tempUS.fullname);
+                                       if (!IsEmptyStr(ret->recp_local)) {
+                                               strcat(ret->recp_local, "|");
+                                       }
+                                       strcat(ret->recp_local, this_recp);
+                               }
+                               else if (getuser(&tempUS, this_recp_cooked) == 0) {
+                                       ++ret->num_local;
+                                       strcpy(this_recp, tempUS.fullname);
+                                       if (!IsEmptyStr(ret->recp_local)) {
+                                               strcat(ret->recp_local, "|");
+                                       }
+                                       strcat(ret->recp_local, this_recp);
+                               }
                                else {
                                        ++ret->num_error;
                                        invalid = 1;