From: Dave West Date: Mon, 17 Mar 2008 23:35:42 +0000 (+0000) Subject: Re-ordered the sequence of checking email addresses against valid system X-Git-Tag: v7.86~2420 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=c1bdfa2df9c336541d24ad028a1f5967f9155e46 Re-ordered the sequence of checking email addresses against valid system 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. --- diff --git a/citadel/Makefile.in b/citadel/Makefile.in index bd104403b..98b88ce4c 100644 --- a/citadel/Makefile.in +++ b/citadel/Makefile.in @@ -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@ diff --git a/citadel/msgbase.c b/citadel/msgbase.c index cce03b3c4..678bec452 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -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;