[dovecot-cvs] dovecot/src/imap main.c,1.75,1.76

cras at dovecot.org cras at dovecot.org
Fri Apr 14 21:21:02 EEST 2006


Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv5712/imap

Modified Files:
	main.c 
Log Message:
If we have plugins set and imap_capability unset, figure out the IMAP
capabilities automatically by running imap binary at startup. The generated
capability list isn't updated until Dovecot is restarted completely, so if
you add or remove IMAP plugins you should restart.



Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/main.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- main.c	13 Apr 2006 20:25:10 -0000	1.75
+++ main.c	14 Apr 2006 18:21:00 -0000	1.76
@@ -186,6 +186,18 @@
 					  getenv("MODULE_LIST"), TRUE);
 	}
 
+	if (getenv("DUMP_CAPABILITY") != NULL) {
+		printf("%s\n", str_c(capability_string));
+		exit(0);
+	}
+
+	str = getenv("IMAP_CAPABILITY");
+	if (str != NULL && *str != '\0') {
+		/* Overrides all capabilities */
+		str_truncate(capability_string, 0);
+		str_append(capability_string, str);
+	}
+
 	str = getenv("IMAP_MAX_LINE_LENGTH");
 	imap_max_line_length = str != NULL ?
 		(unsigned int)strtoul(str, NULL, 10) :



More information about the dovecot-cvs mailing list