[dovecot-cvs] dovecot/src/deliver Makefile.am, 1.1.2.3, 1.1.2.4 deliver.c, 1.20.2.3, 1.20.2.4

cras at dovecot.org cras at dovecot.org
Fri Jun 16 12:09:49 EEST 2006


Update of /var/lib/cvs/dovecot/src/deliver
In directory talvi:/tmp/cvs-serv3449

Modified Files:
      Tag: branch_1_0
	Makefile.am deliver.c 
Log Message:
If mail_plugin_dir isn't given, use the default path for it instead of
ignoring mail_plugins completely.



Index: Makefile.am
===================================================================
RCS file: /var/lib/cvs/dovecot/src/deliver/Makefile.am,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -d -r1.1.2.3 -r1.1.2.4
--- Makefile.am	13 Jun 2006 09:10:37 -0000	1.1.2.3
+++ Makefile.am	16 Jun 2006 09:09:47 -0000	1.1.2.4
@@ -9,7 +9,8 @@
 	-I$(top_srcdir)/src/lib-storage \
 	-I$(top_srcdir)/src/lib-storage/index/mbox \
 	-DSYSCONFDIR=\""$(sysconfdir)"\" \
-	-DPKG_RUNDIR=\""$(rundir)"\"
+	-DPKG_RUNDIR=\""$(rundir)"\" \
+	-DMODULEDIR=\""$(moduledir)"\"
 
 # get some functions included which only plugins use. liblib should probably
 # be a shared library so this wouldn't be needed..

Index: deliver.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/deliver/deliver.c,v
retrieving revision 1.20.2.3
retrieving revision 1.20.2.4
diff -u -d -r1.20.2.3 -r1.20.2.4
--- deliver.c	12 Jun 2006 16:03:10 -0000	1.20.2.3
+++ deliver.c	16 Jun 2006 09:09:47 -0000	1.20.2.4
@@ -485,15 +485,15 @@
 	    str != NULL && var_get_key(str + 1) == 'm')
 		flags |= MAIL_STORAGE_FLAG_KEEP_HEADER_MD5;
 
-	if (getenv("MAIL_PLUGIN_DIR") == NULL)
+	if (getenv("MAIL_PLUGINS") == NULL)
 		modules = NULL;
 	else {
-		if (getenv("MAIL_PLUGIN_DIR") == NULL) {
-			i_fatal("MAIL_PLUGINS given but "
-				"MAIL_PLUGIN_DIR was not");
-		}
-		modules = module_dir_load(getenv("MAIL_PLUGIN_DIR"),
-					  getenv("MAIL_PLUGINS"), TRUE);
+		const char *plugin_dir = getenv("MAIL_PLUGIN_DIR");
+
+		if (plugin_dir == NULL)
+			plugin_dir = MODULEDIR"/lda";
+		modules = module_dir_load(plugin_dir, getenv("MAIL_PLUGINS"),
+					  TRUE);
 	}
 
 	/* FIXME: how should we handle namespaces? */



More information about the dovecot-cvs mailing list