do_system_configuration();
break;
+ case 82:
+ do_internet_configuration();
+ break;
+
case 50:
enter_config(2);
break;
#define GF_SKIP 1 /* <;S>kip floor mode */
#define GF_ZAP 2 /* <;Z>ap floor mode */
-
+/*
+ * MIME types used in Citadel for configuration stuff
+ */
#define SPOOLMIME "application/x-citadel-delivery-list"
+#define INTERNETCFG "application/x-citadel-internet-config"
/*
* This structure is used to hold all of the fields of a message
cmd=54,1,&.,&Aide,&File,&Move
cmd=70,2,&.,&Aide,&Message edit:
cmd=78,1,&.,&Aide,&Post
-cmd=80,2,&.,&Aide,&System configuration
+cmd=80,2,&.,&Aide,&System configuration,&General
+cmd=82,2,&.,&Aide,&System configuration,&Internet
cmd=29,0,&.,&Terminate,and &Quit
cmd=30,0,&.,&Terminate,and &Stay online
int ret;
+
/* If we're configured to send all mail to a smart-host, then our
* job here is really easy.
*/
C_IN, T_MX, answer, sizeof(answer) );
lprintf(9, "res_query() returned %d\n", ret);
- return(0); /* FIX not yet working!! */
+
+ if (ret < 0) {
+ lprintf(5, "No MX found\n");
+ return(0);
+ }
+
+ /* If we had to truncate, shrink the number to avoid fireworks */
+ if (ret > sizeof(answer))
+ ret = sizeof(answer);
+
+ /* FIX not done yet */
+ return(0);
}
serv_gets(buf);
}
}
+
+
+/*
+ * Internet mail configuration
+ */
+void do_internet_configuration(void) {
+ char buf[256];
+ int num_recs = 0;
+ char ch;
+ int badkey;
+ int i;
+
+
+ sprintf(buf, "CONF getsys|%s", INTERNETCFG);
+ serv_puts(buf);
+ serv_gets(buf);
+ if (buf[0] == '1') while (serv_gets(buf), strcmp(buf, "000")) {
+ }
+
+ while (1) {
+ /* do display */
+
+ keyopt("\n<A>dd <D>elete <S>ave <Q>uit -> ");
+ badkey = 0;
+ do {
+ ch = inkey();
+ ch = tolower(ch);
+ switch(ch) {
+ case 'a':
+ printf("Add\n");
+ break;
+ case 'd':
+ printf("Delete\n");
+ break;
+ case 's':
+ printf("Save\n");
+ return;
+ case 'q':
+ printf("Quit\n");
+ i = boolprompt("Quit without saving", 0);
+ if (i == 1) return;
+ break;
+ default:
+ badkey = 1;
+ }
+ } while (badkey == 1);
+ }
+}
void read_bio(void);
void cli_image_upload(char *keyname);
int room_prompt(int qrflags);
+void do_internet_configuration(void);