aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rmilter/config_dir.patch
blob: 92b5c7b016b40b81921ec7776577739699d49eed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff --git a/src/cfg_file.h b/src/cfg_file.h
index a298493..ee87148 100644
--- a/src/cfg_file.h
+++ b/src/cfg_file.h
@@ -39,6 +39,12 @@
 #include <dkim.h>
 #endif
 
+#ifndef RMILTER_CONFDIR
+#define RMILTER_CONFDIR "/etc/rmilter"
+#endif
+
+#define FIXED_CONFIG_FILE RMILTER_CONFDIR "/rmilter.conf"
+
 #define COND_CONNECT_FLAG 0x1
 #define COND_HELO_FLAG 0x2
 #define COND_ENVFROM_FLAG 0x4
diff --git a/src/main.c b/src/main.c
index 67c1667..b3990a8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -259,7 +259,7 @@ main(int argc, char *argv[])
 	init_defaults (cfg);
 
 	if (cfg_file == NULL) {
-		cfg_file = strdup ("/usr/local/etc/rmilter.conf");
+		cfg_file = strdup (FIXED_CONFIG_FILE);
 	}
 
 	f = fopen (cfg_file, "r");