4 * Functions which handle Internet domain configuration etc.
15 #include <sys/types.h>
17 #include <sys/socket.h>
20 #include <netinet/in.h>
32 void display_inetconf(void)
48 ic_localhost = strdup("");
49 ic_gwdom = strdup("");
50 ic_directory = strdup("");
51 ic_spamass = strdup("");
53 ic_smarthost = strdup("");
57 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
58 wprintf("<SPAN CLASS=\"titlebar\">Internet configuration</SPAN>\n");
59 wprintf("</TD></TR></TABLE>\n");
61 serv_printf("CONF GETSYS|application/x-citadel-internet-config");
63 if (buf[0] == '1') while (serv_gets(buf), strcmp(buf, "000")) {
65 extract(ename, buf, 0);
66 extract(etype, buf, 0);
68 if (!strcasecmp(etype, "localhost")) which = ic_localhost;
69 else if (!strcasecmp(etype, "gatewaydomain")) which = ic_gwdom;
70 else if (!strcasecmp(etype, "directory")) which = ic_directory;
71 else if (!strcasecmp(etype, "spamassassin")) which = ic_directory;
72 else if (!strcasecmp(etype, "rbl")) which = ic_rbl;
73 else if (!strcasecmp(etype, "smarthost")) which = ic_smarthost;
76 which = realloc(which, strlen(which) + strlen(ename) + 2);
77 if (strlen(which) > 0) strcat(which, "\n");
81 ic_misc = realloc(ic_misc, strlen(ic_misc) + strlen(buf) + 2);
82 if (strlen(ic_misc) > 0) strcat(ic_misc, "\n");
86 /* FIXME finish this */
103 void save_inetconf(void) {
105 strcpy(WC->ImportantMessage, "FIXME did we do anything?");