All, I found it necessary to have multiple master process running on the same server, so I patched 2.0.16 to accept the -C option. I tried to stay consistant with the way that the other alternate config was done in the other applications. I probably do not need to send the patch because it is such a trivial change, but I want to express my desire to get this feature into the supported source tree. Thanks for this fabulous piece of software!! Comments appreciated. Greg Hewett
diff -r cyrus-imapd-2.0.16/master/master.c cyrus-imapd-2.0.16+patch/master/master.c *** cyrus-imapd-2.0.16+patch/master/master.c Fri Sep 05 12:00:00 2001 --- cyrus-imapd-2.0.16/master/master.c Fri Sep 05 12:00:00 2000 933c933 < void reread_conf(void) --- > void reread_conf(const char *alt_config) 943c943 < masterconf_getsection("SERVICES", &add_service, NULL); --- > masterconf_getsection("SERVICES", &add_service, NULL, alt_config); 991c991 < masterconf_getsection("EVENTS", &add_event, NULL); --- > masterconf_getsection("EVENTS", &add_event, NULL, alt_config); 1001a1002 > char *alt_config = NULL; 1002a1004 > 1005c1007 < while ((opt = getopt(argc, argv, "l:D")) != EOF) { --- > while ((opt = getopt(argc, argv, "C:l:D")) != EOF) { 1006a1009,1011 > case 'C': > alt_config = optarg; > break; 1056,1058c1061,1063 < masterconf_getsection("START", &add_start, NULL); < masterconf_getsection("SERVICES", &add_service, NULL); < masterconf_getsection("EVENTS", &add_event, NULL); --- > masterconf_getsection("START", &add_start, NULL, alt_config); > masterconf_getsection("SERVICES", &add_service, NULL, alt_config); > masterconf_getsection("EVENTS", &add_event, NULL, alt_config); 1114c1119 < reread_conf(); --- > reread_conf(alt_config); diff -r cyrus-imapd-2.0.16/master/masterconf.c cyrus-imapd-2.0.16+patch/master/masterconf.c *** cyrus-imapd-2.0.16+patch/master/masterconf.c Fri Sep 05 12:00:00 2001 --- cyrus-imapd-2.0.16/master/masterconf.c Fri Sep 05 12:00:00 2000 193c193 < void *rock) --- > void *rock, const char *alt_config) 201c201,202 < infile = fopen(CONFIG_FILENAME, "r"); --- > infile = fopen(alt_config ? alt_config : CONFIG_FILENAME, "r"); > diff -r cyrus-imapd-2.0.16/master/masterconf.h cyrus-imapd-2.0.16+patch/master/masterconf.h *** cyrus-imapd-2.0.16+patch/master/masterconf.h Fri Sep 05 12:00:00 2001 --- cyrus-imapd-2.0.16/master/masterconf.h Fri Sep 05 12:00:00 2000 62c62,63 < masterconf_process *f, void *rock); --- > masterconf_process *f, void *rock, > const char *alt_config);