From: Timo Sirainen Date: Tue, 20 May 2003 18:49:41 +0000 (+0300) Subject: Check that imap/pop3 module directories exist if they're enabled. Give a X-Git-Tag: 1.1.alpha1~4613 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7367ea5dffdd9df1637fa66ae0b8540d5811558;p=thirdparty%2Fdovecot%2Fcore.git Check that imap/pop3 module directories exist if they're enabled. Give a warning if module support is enabled in config file but not built into binary. --HG-- branch : HEAD --- diff --git a/src/master/master-settings.c b/src/master/master-settings.c index a9062184d3..68d9554987 100644 --- a/src/master/master-settings.c +++ b/src/master/master-settings.c @@ -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) {