]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Check that imap/pop3 module directories exist if they're enabled. Give a
authorTimo Sirainen <tss@iki.fi>
Tue, 20 May 2003 18:49:41 +0000 (21:49 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 20 May 2003 18:49:41 +0000 (21:49 +0300)
warning if module support is enabled in config file but not built into
binary.

--HG--
branch : HEAD

src/master/master-settings.c

index a9062184d369dbf349a3eaff8a6c58a4567f2276..68d955498700b41de88b3aa753ca752dff67720e 100644 (file)
@@ -327,6 +327,18 @@ static void settings_verify(struct settings *set)
                        i_fatal("Can't use imap executable %s: %m",
                                set->imap_executable);
                }
+#ifdef HAVE_MODULES
+               if (set->imap_use_modules &&
+                   access(set->imap_modules, R_OK | X_OK) < 0) {
+                       i_fatal("Can't access imap module directory: %s: %m",
+                               set->imap_modules);
+               }
+#else
+               if (set->imap_use_modules) {
+                       i_warning("Module support wasn't built into Dovecot, "
+                                 "ignoring imap_use_modules setting");
+               }
+#endif
        }
 
        if (strstr(set->protocols, "pop3") != NULL) {
@@ -334,6 +346,18 @@ static void settings_verify(struct settings *set)
                        i_fatal("Can't use pop3 executable %s: %m",
                                set->pop3_executable);
                }
+#ifdef HAVE_MODULES
+               if (set->pop3_use_modules &&
+                   access(set->pop3_modules, R_OK | X_OK) < 0) {
+                       i_fatal("Can't access pop3 module directory: %s: %m",
+                               set->imap_modules);
+               }
+#else
+               if (set->pop3_use_modules) {
+                       i_warning("Module support wasn't built into Dovecot, "
+                                 "ignoring pop3_use_modules setting");
+               }
+#endif
        }
 
        if (set->log_path != NULL && access(set->log_path, W_OK) < 0) {