+
+ /* Media messiahs preying on my fears... */
+ do {
+ snprintf(buf, sizeof buf, "%d", mbx_expirepolicy->expire_mode);
+ strprompt("Mailbox default message expire policy (? for list)",
+ buf, 1);
+ if (buf[0] == '?') {
+ scr_printf("\n"
+ "0. Go with the system default\n"
+ "1. Never automatically expire messages\n"
+ "2. Expire by message count\n"
+ "3. Expire by message age\n");
+ }
+ } while ((buf[0] < '0') || (buf[0] > '3'));
+ mbx_expirepolicy->expire_mode = buf[0] - '0';
+
+ /* ...Pop culture prophets playing in my ears */
+ if (mbx_expirepolicy->expire_mode == 2) {
+ snprintf(buf, sizeof buf, "%d", mbx_expirepolicy->expire_value);
+ strprompt("Keep how many messages online?", buf, 10);
+ mbx_expirepolicy->expire_value = atol(buf);
+ }
+ if (mbx_expirepolicy->expire_mode == 3) {
+ snprintf(buf, sizeof buf, "%d", mbx_expirepolicy->expire_value);
+ strprompt("Keep messages for how many days?", buf, 10);
+ mbx_expirepolicy->expire_value = atol(buf);
+ }
+
+ strprompt("How often to run network jobs (in seconds)", &sc[28][0], 5);
+ strprompt("Hour to run purges (0-23)", &sc[31][0], 2);
+ snprintf(sc[42], sizeof sc[42], "%d", (boolprompt(
+ "Enable full text search index (warning: resource intensive)",
+ atoi(&sc[42][0]))));
+
+ snprintf(sc[46], sizeof sc[46], "%d", (boolprompt(
+ "Perform journaling of email messages",
+ atoi(&sc[46][0]))));
+ snprintf(sc[47], sizeof sc[47], "%d", (boolprompt(
+ "Perform journaling of non-email messages",
+ atoi(&sc[47][0]))));
+ if ( (atoi(&sc[46][0])) || (atoi(&sc[47][0])) ) {
+ strprompt("Email destination of journalized messages",
+ &sc[48][0], 127);
+ }
+
+ /* Funambol push stuff */
+ int yes_funambol = 0;
+ if (strlen(sc[53]) > 0) yes_funambol = 1;
+ yes_funambol = boolprompt("Connect to an external Funambol sync server", yes_funambol);
+ if (yes_funambol) {
+ strprompt("Funambol server (blank to disable)", &sc[53][0], 63);
+ strprompt("Funambol server port", &sc[54][0], 5);
+ strprompt("Funambol sync source", &sc[55][0], 63);
+ strprompt("Funambol authentication details (user:pass in Base64)", &sc[56][0],63);
+ }
+ else {
+ sc[53][0] = 0;
+ sc[54][0] = 0;
+ sc[55][0] = 0;
+ sc[56][0] = 0;
+ }
+
+ /* Master user account */
+ int yes_muacct = 0;
+ if (strlen(sc[58]) > 0) yes_muacct = 1;
+ yes_muacct = boolprompt("Enable a 'master user' account", yes_muacct);
+ if (yes_muacct) {
+ strprompt("Master user name", &sc[58][0], 31);
+ strprompt("Master user password", &sc[59][0], -31);
+ }
+ else {
+ strcpy(&sc[58][0], "");
+ strcpy(&sc[59][0], "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
+ }
+