From c142ba32170b224beaad8dd9c557af49fd303ade Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 13 Feb 2005 04:23:59 +0000 Subject: [PATCH] * 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. --- citadel/ChangeLog | 7 +++++++ citadel/citadel.h | 3 +++ citadel/control.c | 12 ++++++++++++ citadel/routines2.c | 5 ++++- citadel/serv_vandelay.c | 6 ++++++ citadel/setup.c | 3 +++ citadel/techdoc/protocol.txt | 4 ++++ 7 files changed, 39 insertions(+), 1 deletion(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index d05844c71..cb8752c9d 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,10 @@ $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 @@ -6382,3 +6388,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/citadel.h b/citadel/citadel.h index 5308f0406..593e87467 100644 --- a/citadel/citadel.h +++ b/citadel/citadel.h @@ -136,6 +136,9 @@ struct config { 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)*/ }; /* diff --git a/citadel/control.c b/citadel/control.c index 9cd1128e7..78f0736c0 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -211,6 +211,9 @@ void cmd_conf(char *argbuf) #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"); } @@ -376,6 +379,15 @@ void cmd_conf(char *argbuf) 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; } diff --git a/citadel/routines2.c b/citadel/routines2.c index 94772edbb..3202f7996 100644 --- a/citadel/routines2.c +++ b/citadel/routines2.c @@ -644,7 +644,7 @@ void read_bio(CtdlIPC *ipc) void do_system_configuration(CtdlIPC *ipc) { -#define NUM_CONFIGS 39 +#define NUM_CONFIGS 42 char buf[SIZ]; char sc[NUM_CONFIGS][SIZ]; @@ -736,9 +736,12 @@ void do_system_configuration(CtdlIPC *ipc) 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 diff --git a/citadel/serv_vandelay.c b/citadel/serv_vandelay.c index 372b1e255..922e1dc27 100644 --- a/citadel/serv_vandelay.c +++ b/citadel/serv_vandelay.c @@ -299,6 +299,9 @@ void artv_do_export(void) { 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(); @@ -363,6 +366,9 @@ void artv_import_config(void) { 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"); } diff --git a/citadel/setup.c b/citadel/setup.c index af2ae7e0f..db36bc3f8 100644 --- a/citadel/setup.c +++ b/citadel/setup.c @@ -1083,6 +1083,9 @@ int main(int argc, char *argv[]) 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) { diff --git a/citadel/techdoc/protocol.txt b/citadel/techdoc/protocol.txt index 23111b7ac..6db52a6d0 100644 --- a/citadel/techdoc/protocol.txt +++ b/citadel/techdoc/protocol.txt @@ -1817,6 +1817,10 @@ fails for any reason, ERROR is returned. 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 -- 2.39.2