one typo in a define. moved file calculation to the rest.
authorWilfried Göesgens <willi@citadel.org>
Thu, 9 Feb 2006 19:05:58 +0000 (19:05 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 9 Feb 2006 19:05:58 +0000 (19:05 +0000)
citadel/citadel_dirs.c
citadel/citadel_dirs.h
citadel/msgbase.c

index a5cf4076d2fde68e207480669408afbc73dc768b..807c722e39a975f2dcfd11b8c988e2d9f6f94c70 100644 (file)
@@ -53,6 +53,7 @@ char file_citadel_rc[PATH_MAX]="";
 char file_citadel_config[PATH_MAX]="";
 char file_lmtp_socket[PATH_MAX]="";
 char file_lmtp_unfiltered_socket[PATH_MAX]="";
+char file_mail_aliases[PATH_MAX]="";
 
 int home_specified = 0;
 
@@ -161,6 +162,21 @@ void calc_dirs_n_files(int relh, int home, const char *relhome,const char  *ctdl
                         "%slmtp-unfiltered.socket",
                         ctdl_run_dir);
 
+
+       /* 
+        * DIRTY HACK FOLLOWS! due to configs in the network dir in the 
+        * legacy installations, we need to calculate ifdeffed here.
+        */
+               snprintf(file_mail_aliases, 
+                                sizeof file_mail_aliases,
+                                "%smail.aliases",
+#ifdef HAVE_ETC_DIR
+                                ctdl_etc_dir
+#else
+                                ctdl_spool_dir
+#endif
+                                );
+
 }
 
 
index cae21853299ebf346cf14885c9f3538b52358c19..fb20355cf8a6da7906c569cb73a30a7c6af2cb5c 100644 (file)
@@ -36,6 +36,7 @@ extern char file_citadel_rc[PATH_MAX];
 extern char file_citadel_config[PATH_MAX];
 extern char file_lmtp_socket[PATH_MAX];
 extern char file_lmtp_unfiltered_socket[PATH_MAX];
+extern char file_mail_aliases[PATH_MAX];
 
 
 extern void calc_dirs_n_files(int relh, int home, const char *relhome,const char  *ctdldir);
index 2ca19528c429f7ae6adb48c8598a8140c742bb25..94784f48ed12d99e5066081e6df85f79573191fe 100644 (file)
@@ -139,26 +139,12 @@ int alias(char *name)
        char node[64];
        char testnode[64];
        char buf[SIZ];
-       char filename[256];
 
        striplt(name);
        remove_any_whitespace_to_the_left_or_right_of_at_symbol(name);
        stripallbut(name, '<', '>');
 
-       /* 
-        * DIRTY HACK FOLLOWS! due to configs in the network dir in the 
-        * legacy installations, we need to calculate ifdeffed here.
-        */
-               snprintf(filename, 
-                                sizeof filename,
-                                "%smail.aliases",
-#ifndef HAVE_ETG_DIR
-                                ctdl_spool_dir
-#else
-                                ctdl_etc_dir
-#endif
-                                );
-       fp = fopen(filename, "r");
+       fp = fopen(file_mail_aliases, "r");
        if (fp == NULL) {
                fp = fopen("/dev/null", "r");
        }