aports/unmaintained/rmilter/config_dir.patch

31 lines
723 B
Diff

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");