]> code.citadel.org Git - citadel.git/blobdiff - citadel/msgbase.c
* Finished most of the work for the Global Address Book.
[citadel.git] / citadel / msgbase.c
index f13e75aac6fda049f025e04f5da6ed6769c3a758..3996618a83a171dab058ce764d0152fa9730f81d 100644 (file)
@@ -158,6 +158,12 @@ int alias(char *name)
                        strcpy(name, bbb);
        }
        fclose(fp);
+
+       /* Hit the Global Address Book */
+       if (CtdlDirectoryLookup(aaa, name) == 0) {
+               strcpy(name, aaa);
+       }
+
        lprintf(7, "Mail is being forwarded to %s\n", name);
 
        /* Change "user @ xxx" to "user" if xxx is an alias for this host */
@@ -170,11 +176,6 @@ int alias(char *name)
                }
        }
 
-       /* Hit the Global Address Book */
-       if (CtdlDirectoryLookup(aaa, name) == 0) {
-               strcpy(name, aaa);
-       }
-
        /* determine local or remote type, see citadel.h */
        at = haschar(name, '@');
        if (at == 0) return(MES_LOCAL);         /* no @'s - local address */