$Log$
+ Revision 640.4 2005/02/13 04:23:59 ajc
+ * Added server and client configuration settings to specify port
+ numbers for IMAPS, POP3S, and SMTPS (SSL-encrypted services that start
+ SSL upon connect instead of using a STARTTLS command). These services
+ are not yet implemented, only the port number settings are.
+
Revision 640.3 2005/02/13 03:39:21 ajc
* IMAP flag twiddling with STORE was broken because of the \Flag leading
backslash getting stripped out. Located problem and worked around. Said
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
char c_ldap_bind_dn[256]; /* LDAP bind DN */
char c_ldap_bind_pw[256]; /* LDAP bind password */
int c_msa_port; /* SMTP MSA listener port (usu 587) */
+ int c_imaps_port; /* IMAPS listener port (usually 993)*/
+ int c_pop3s_port; /* POP3S listener port (usually 995)*/
+ int c_smtps_port; /* SMTPS listener port (usually 465)*/
};
/*
#endif
cprintf("%s\n", config.c_ip_addr);
cprintf("%d\n", config.c_msa_port);
+ cprintf("%d\n", config.c_imaps_port);
+ cprintf("%d\n", config.c_pop3s_port);
+ cprintf("%d\n", config.c_smtps_port);
cprintf("000\n");
}
case 38:
config.c_msa_port = atoi(buf);
break;
+ case 39:
+ config.c_imaps_port = atoi(buf);
+ break;
+ case 40:
+ config.c_pop3s_port = atoi(buf);
+ break;
+ case 41:
+ config.c_smtps_port = atoi(buf);
+ break;
}
++a;
}
void do_system_configuration(CtdlIPC *ipc)
{
-#define NUM_CONFIGS 39
+#define NUM_CONFIGS 42
char buf[SIZ];
char sc[NUM_CONFIGS][SIZ];
strprompt("Server IP address (0.0.0.0 for 'any')", &sc[37][0], 15);
strprompt("POP3 server port (-1 to disable)", &sc[23][0], 5);
+ strprompt("POP3S server port (-1 to disable)", &sc[40][0], 5);
strprompt("IMAP server port (-1 to disable)", &sc[27][0], 5);
+ strprompt("IMAPS server port (-1 to disable)", &sc[39][0], 5);
strprompt("SMTP MTA server port (-1 to disable)", &sc[24][0], 5);
strprompt("SMTP MSA server port (-1 to disable)", &sc[38][0], 5);
+ strprompt("SMTPS server port (-1 to disable)", &sc[41][0], 5);
/* This logic flips the question around, because it's one of those
* situations where 0=yes and 1=no
cprintf("%s\n", config.c_ldap_bind_pw);
cprintf("%s\n", config.c_ip_addr);
cprintf("%d\n", config.c_msa_port);
+ cprintf("%d\n", config.c_imaps_port);
+ cprintf("%d\n", config.c_pop3s_port);
+ cprintf("%d\n", config.c_smtps_port);
/* Export the control file */
get_control();
client_getln(config.c_ldap_bind_pw, sizeof config.c_ldap_bind_pw);
client_getln(config.c_ip_addr, sizeof config.c_ip_addr);
client_getln(buf, sizeof buf); config.c_msa_port = atoi(buf);
+ client_getln(buf, sizeof buf); config.c_imaps_port = atoi(buf);
+ client_getln(buf, sizeof buf); config.c_pop3s_port = atoi(buf);
+ client_getln(buf, sizeof buf); config.c_smtps_port = atoi(buf);
put_config();
lprintf(CTDL_INFO, "Imported config file\n");
}
if (config.c_pop3_port == 0) config.c_pop3_port = 110;
if (config.c_imap_port == 0) config.c_imap_port = 143;
if (config.c_msa_port == 0) config.c_msa_port = 587;
+ if (config.c_smtps_port == 0) config.c_smtps_port = 465;
+ if (config.c_pop3s_port == 0) config.c_pop3s_port = 995;
+ if (config.c_imaps_port == 0) config.c_imaps_port = 993;
/* Go through a series of dialogs prompting for config info */
if (setup_type != UI_SILENT) {
36. LDAP Bind DN
37. Password for LDAP Bind DN
38. Server IP address to listen on (or "0.0.0.0" for all addresses)
+ 39. Port number for SMTP MSA service
+ 40. Port number for IMAPS (SSL-encrypted IMAP)
+ 41. Port number for POP3S (SSL-encrypted POP3)
+ 42. Port number for SMTPS (SSL-encrypted SMTP)
CONF also accepts two additional commands: GETSYS and PUTSYS followed by an
arbitrary MIME type (such as application/x-citadel-internet-config) which