1 diff -ru dovecot-2.3.9.2.orig/src/auth/main.c dovecot-2.3.9.2/src/auth/main.c
2 --- dovecot-2.3.9.2.orig/src/auth/main.c 2019-12-13 14:12:00.000000000 +0100
3 +++ dovecot-2.3.9.2/src/auth/main.c 2019-12-15 19:46:52.101597499 +0100
5 mod_set.debug = global_auth_settings->debug;
6 mod_set.filter_callback = auth_module_filter;
8 - modules = module_dir_load(AUTH_MODULE_DIR, NULL, &mod_set);
9 + modules = module_dir_load("/etc/dovecot/modules/auth", NULL, &mod_set);
10 module_dir_init(modules);
14 mod_set.debug = global_auth_settings->debug;
15 mod_set.ignore_missing = TRUE;
17 - modules = module_dir_load_missing(modules, AUTH_MODULE_DIR, names,
18 + modules = module_dir_load_missing(modules, "/etc/dovecot/modules/auth", names,
20 module_dir_init(modules);
22 diff -ru dovecot-2.3.9.2.orig/src/config/all-settings.c dovecot-2.3.9.2/src/config/all-settings.c
23 --- dovecot-2.3.9.2.orig/src/config/all-settings.c 2019-12-13 14:12:32.000000000 +0100
24 +++ dovecot-2.3.9.2/src/config/all-settings.c 2019-12-15 19:49:42.764650074 +0100
29 - .mail_plugin_dir = MODULEDIR,
30 + .mail_plugin_dir = "/etc/dovecot/modules",
32 .mail_log_prefix = "%s(%u)<%{pid}><%{session}>: ",
35 .login_log_format = "%$: %s",
36 .login_access_sockets = "",
37 .login_proxy_notify_path = "proxy-notify",
38 - .login_plugin_dir = MODULEDIR"/login",
39 + .login_plugin_dir = "/etc/dovecot/modules""/login",
41 .login_proxy_max_disconnect_delay = 0,
42 .director_username_hash = "%u",
44 .login_trusted_networks = "",
47 - .mail_plugin_dir = MODULEDIR,
48 + .mail_plugin_dir = "/etc/dovecot/modules",
50 static const struct setting_parser_info *lmtp_setting_dependencies[] = {
51 &lda_setting_parser_info,
53 .base_dir = PKG_RUNDIR,
54 .libexec_dir = PKG_LIBEXECDIR,
56 - .mail_plugin_dir = MODULEDIR,
57 + .mail_plugin_dir = "/etc/dovecot/modules",
58 .mail_temp_dir = "/tmp",
60 .auth_socket_path = "auth-userdb",
61 diff -ru dovecot-2.3.9.2.orig/src/config/config-parser.c dovecot-2.3.9.2/src/config/config-parser.c
62 --- dovecot-2.3.9.2.orig/src/config/config-parser.c 2019-12-13 14:12:00.000000000 +0100
63 +++ dovecot-2.3.9.2/src/config/config-parser.c 2019-12-15 19:46:52.102597505 +0100
67 mod_set.abi_version = DOVECOT_ABI_VERSION;
68 - modules = module_dir_load(CONFIG_MODULE_DIR, NULL, &mod_set);
69 + modules = module_dir_load("/etc/dovecot/modules/settings", NULL, &mod_set);
70 module_dir_init(modules);
72 i_array_init(&new_roots, 64);
73 diff -ru dovecot-2.3.9.2.orig/src/dict/main.c dovecot-2.3.9.2/src/dict/main.c
74 --- dovecot-2.3.9.2.orig/src/dict/main.c 2019-12-13 14:12:00.000000000 +0100
75 +++ dovecot-2.3.9.2/src/dict/main.c 2019-12-15 19:46:52.102597505 +0100
77 mod_set.abi_version = DOVECOT_ABI_VERSION;
78 mod_set.require_init_funcs = TRUE;
80 - modules = module_dir_load(DICT_MODULE_DIR, NULL, &mod_set);
81 + modules = module_dir_load("/etc/dovecot/modules/dict", NULL, &mod_set);
82 module_dir_init(modules);
84 /* Register only after loading modules. They may contain SQL drivers,
85 diff -ru dovecot-2.3.9.2.orig/src/doveadm/doveadm-settings.c dovecot-2.3.9.2/src/doveadm/doveadm-settings.c
86 --- dovecot-2.3.9.2.orig/src/doveadm/doveadm-settings.c 2019-12-13 14:12:00.000000000 +0100
87 +++ dovecot-2.3.9.2/src/doveadm/doveadm-settings.c 2019-12-15 19:47:29.525812499 +0100
89 .base_dir = PKG_RUNDIR,
90 .libexec_dir = PKG_LIBEXECDIR,
92 - .mail_plugin_dir = MODULEDIR,
93 + .mail_plugin_dir = "/etc/dovecot/modules",
94 .mail_temp_dir = "/tmp",
96 .auth_socket_path = "auth-userdb",
97 diff -ru dovecot-2.3.9.2.orig/src/doveadm/doveadm-util.c dovecot-2.3.9.2/src/doveadm/doveadm-util.c
98 --- dovecot-2.3.9.2.orig/src/doveadm/doveadm-util.c 2019-12-13 14:12:00.000000000 +0100
99 +++ dovecot-2.3.9.2/src/doveadm/doveadm-util.c 2019-12-15 19:52:32.003844670 +0100
101 mod_set.debug = doveadm_debug;
102 mod_set.ignore_dlopen_errors = TRUE;
104 - modules = module_dir_load_missing(modules, DOVEADM_MODULEDIR,
105 + modules = module_dir_load_missing(modules, "/etc/dovecot/modules/doveadm",
107 module_dir_init(modules);
113 - dir = opendir(DOVEADM_MODULEDIR);
114 + dir = opendir("/etc/dovecot/modules/doveadm");
118 diff -ru dovecot-2.3.9.2.orig/src/lib-fs/fs-api.c dovecot-2.3.9.2/src/lib-fs/fs-api.c
119 --- dovecot-2.3.9.2.orig/src/lib-fs/fs-api.c 2019-12-13 14:12:00.000000000 +0100
120 +++ dovecot-2.3.9.2/src/lib-fs/fs-api.c 2019-12-15 19:46:52.102597505 +0100
122 mod_set.abi_version = DOVECOT_ABI_VERSION;
123 mod_set.ignore_missing = TRUE;
125 - fs_modules = module_dir_load_missing(fs_modules, MODULE_DIR,
126 + fs_modules = module_dir_load_missing(fs_modules, "/etc/dovecot/modules",
127 module_name, &mod_set);
128 module_dir_init(fs_modules);
130 diff -ru dovecot-2.3.9.2.orig/src/lib-ssl-iostream/iostream-ssl.c dovecot-2.3.9.2/src/lib-ssl-iostream/iostream-ssl.c
131 --- dovecot-2.3.9.2.orig/src/lib-ssl-iostream/iostream-ssl.c 2019-12-13 14:12:00.000000000 +0100
132 +++ dovecot-2.3.9.2/src/lib-ssl-iostream/iostream-ssl.c 2019-12-15 19:46:52.102597505 +0100
134 mod_set.abi_version = DOVECOT_ABI_VERSION;
135 mod_set.setting_name = "<built-in lib-ssl-iostream lookup>";
136 mod_set.require_init_funcs = TRUE;
137 - ssl_module = module_dir_load(MODULE_DIR, plugin_name, &mod_set);
138 + ssl_module = module_dir_load("/etc/dovecot/modules", plugin_name, &mod_set);
139 if (module_dir_try_load_missing(&ssl_module, MODULE_DIR, plugin_name,
140 &mod_set, error_r) < 0)
142 diff -ru dovecot-2.3.9.2.orig/src/lib-storage/mail-storage-settings.c dovecot-2.3.9.2/src/lib-storage/mail-storage-settings.c
143 --- dovecot-2.3.9.2.orig/src/lib-storage/mail-storage-settings.c 2019-12-13 14:12:00.000000000 +0100
144 +++ dovecot-2.3.9.2/src/lib-storage/mail-storage-settings.c 2019-12-15 19:46:52.102597505 +0100
149 - .mail_plugin_dir = MODULEDIR,
150 + .mail_plugin_dir = "/etc/dovecot/modules",
152 .mail_log_prefix = "%s(%u)<%{pid}><%{session}>: ",
154 diff -ru dovecot-2.3.9.2.orig/src/lmtp/lmtp-settings.c dovecot-2.3.9.2/src/lmtp/lmtp-settings.c
155 --- dovecot-2.3.9.2.orig/src/lmtp/lmtp-settings.c 2019-12-13 14:12:00.000000000 +0100
156 +++ dovecot-2.3.9.2/src/lmtp/lmtp-settings.c 2019-12-15 19:46:52.102597505 +0100
158 .login_trusted_networks = "",
161 - .mail_plugin_dir = MODULEDIR,
162 + .mail_plugin_dir = "/etc/dovecot/modules",
165 static const struct setting_parser_info *lmtp_setting_dependencies[] = {