* Added server and client configuration settings to specify port
authorArt Cancro <ajc@citadel.org>
Sun, 13 Feb 2005 04:23:59 +0000 (04:23 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 13 Feb 2005 04:23:59 +0000 (04:23 +0000)
  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
citadel/citadel.h
citadel/control.c
citadel/routines2.c
citadel/serv_vandelay.c
citadel/setup.c
citadel/techdoc/protocol.txt

index d05844c71b364ac5fc8c9161b37831e465d9d58b..cb8752c9da7706d7ecbff811b35d66c727d847e5 100644 (file)
@@ -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 <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index 5308f0406b06943983a451c7e3dfae3b14e7243f..593e874677f035626393c8f55c7108ceebd59535 100644 (file)
@@ -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)*/
 };
 
 /*
index 9cd1128e79a9e97130a54e6851d4a8f7dce03edf..78f0736c0e7ca2fee6525970dd095cc3b33e8e21 100644 (file)
@@ -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;
                }
index 94772edbb850253bc9052a1effd81912e21dbbd3..3202f7996ca328c1bf32124282ccb23df6094b19 100644 (file)
@@ -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
index 372b1e2555b823ba228b74a37f53ae8960469a70..922e1dc277cdf97ded7316d57c908775a7f1f015 100644 (file)
@@ -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");
 }
index af2ae7e0f73acb4bad2d358d10e57e37e9d6797c..db36bc3f87069934872a5c54b4a550df8504f1bc 100644 (file)
@@ -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) {
index 23111b7acc7e470729436b76fabb539cb5b21e07..6db52a6d021fae458a443a921e7b2f789be2819f 100644 (file)
@@ -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