* Added IMAP port number to struct config, etc.
authorArt Cancro <ajc@citadel.org>
Tue, 17 Oct 2000 15:22:44 +0000 (15:22 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 17 Oct 2000 15:22:44 +0000 (15:22 +0000)
citadel/citadel.h
citadel/control.c
citadel/routines2.c
citadel/serv_imap.c
citadel/setup.c
citadel/techdoc/session.txt

index 5ec5d4890e073d7d967af6a3fcc439a9b1899f59..3a8580011585defed8a411e4559ca2ff6016fae1 100644 (file)
@@ -100,6 +100,7 @@ struct config {
        int c_smtp_port;                /* SMTP listener port (usually 25)  */
        int c_default_filter;           /* Default moderation filter level  */
        int c_aide_zap;                 /* Are Aides allowed to zap rooms?  */
        int c_smtp_port;                /* SMTP listener port (usually 25)  */
        int c_default_filter;           /* Default moderation filter level  */
        int c_aide_zap;                 /* Are Aides allowed to zap rooms?  */
+       int c_imap_port;                /* IMAP listener port (usually 143) */
 };
 
 #define NODENAME               config.c_nodename
 };
 
 #define NODENAME               config.c_nodename
index 0f595289abc8dc96c6cdeb6853dc168ce11c884d..26ea7d3304419b8dbca1b5224b08f037fd56ab42 100644 (file)
@@ -173,6 +173,7 @@ void cmd_conf(char *argbuf) {
                cprintf("%d\n", config.c_smtp_port);
                cprintf("%d\n", config.c_default_filter);
                cprintf("%d\n", config.c_aide_zap);
                cprintf("%d\n", config.c_smtp_port);
                cprintf("%d\n", config.c_default_filter);
                cprintf("%d\n", config.c_aide_zap);
+               cprintf("%d\n", config.c_imap_port);
                cprintf("000\n");
                }
 
                cprintf("000\n");
                }
 
@@ -262,6 +263,8 @@ void cmd_conf(char *argbuf) {
                                if (config.c_aide_zap != 0)
                                        config.c_aide_zap = 1;
                                break;
                                if (config.c_aide_zap != 0)
                                        config.c_aide_zap = 1;
                                break;
+                       case 27: config.c_imap_port = atoi(buf);
+                               break;
                        }
                    ++a;
                    }
                        }
                    ++a;
                    }
index 212bcd3dfb5c976875e00ae7fabe5ce35eb40bf5..e3f69c470c4743da223590cd8531fae6c00b9e2a 100644 (file)
@@ -625,7 +625,7 @@ void read_bio(void)
 void do_system_configuration(void)
 {
        char buf[256];
 void do_system_configuration(void)
 {
        char buf[256];
-       char sc[27][256];
+       char sc[28][256];
        int expire_mode = 0;
        int expire_value = 0;
        int a;
        int expire_mode = 0;
        int expire_value = 0;
        int a;
@@ -640,7 +640,7 @@ void do_system_configuration(void)
        if (buf[0] == '1') {
                a = 0;
                while (serv_gets(buf), strcmp(buf, "000")) {
        if (buf[0] == '1') {
                a = 0;
                while (serv_gets(buf), strcmp(buf, "000")) {
-                       if (a < 27)
+                       if (a < 28)
                                strcpy(&sc[a][0], buf);
                        ++a;
                }
                                strcpy(&sc[a][0], buf);
                        ++a;
                }
@@ -709,8 +709,9 @@ void do_system_configuration(void)
        strprompt("Minimum number of worker threads", &sc[21][0], 3);
        strprompt("Maximum number of worker threads", &sc[22][0], 3);
        strprompt("Server-to-server networking password", &sc[15][0], 19);
        strprompt("Minimum number of worker threads", &sc[21][0], 3);
        strprompt("Maximum number of worker threads", &sc[22][0], 3);
        strprompt("Server-to-server networking password", &sc[15][0], 19);
-       strprompt("POP3 server port (-1 to disable)", &sc[23][0], 5);
        strprompt("SMTP server port (-1 to disable)", &sc[24][0], 5);
        strprompt("SMTP server port (-1 to disable)", &sc[24][0], 5);
+       strprompt("POP3 server port (-1 to disable)", &sc[23][0], 5);
+       strprompt("IMAP server port (-1 to disable)", &sc[27][0], 5);
 
 
        /* Expiry settings */
 
 
        /* Expiry settings */
@@ -748,7 +749,7 @@ void do_system_configuration(void)
                serv_puts("CONF set");
                serv_gets(buf);
                if (buf[0] == '4') {
                serv_puts("CONF set");
                serv_gets(buf);
                if (buf[0] == '4') {
-                       for (a = 0; a < 27; ++a)
+                       for (a = 0; a < 28; ++a)
                                serv_puts(&sc[a][0]);
                        serv_puts("000");
                }
                                serv_puts(&sc[a][0]);
                        serv_puts("000");
                }
index 3d40c54ce3fdf65279e899a5514c5da292b367a9..738cec2262fdefc1eba11456f4f183dba5e1ca9a 100644 (file)
@@ -403,7 +403,7 @@ void imap_command_loop(void) {
 char *Dynamic_Module_Init(void)
 {
        SYM_IMAP = CtdlGetDynamicSymbol();
 char *Dynamic_Module_Init(void)
 {
        SYM_IMAP = CtdlGetDynamicSymbol();
-       CtdlRegisterServiceHook(1143,   /* FIXME put in config setup */
+       CtdlRegisterServiceHook(config.c_imap_port,
                                NULL,
                                imap_greeting,
                                imap_command_loop);
                                NULL,
                                imap_greeting,
                                imap_command_loop);
index 16e2751566f07447f3978bd1628b86e4ecc0f479..a64ee076794ae14387aa0b293052eb88c5047ee4 100644 (file)
@@ -849,8 +849,9 @@ int main(int argc, char *argv[])
        /*
         * Default port numbers for various services
         */
        /*
         * Default port numbers for various services
         */
-       if (config.c_pop3_port == 0) config.c_pop3_port = 110;
        if (config.c_smtp_port == 0) config.c_smtp_port = 25;
        if (config.c_smtp_port == 0) config.c_smtp_port = 25;
+       if (config.c_pop3_port == 0) config.c_pop3_port = 110;
+       if (config.c_imap_port == 0) config.c_imap_port = 143;
 
 
        /* Go through a series of dialogs prompting for config info */
 
 
        /* Go through a series of dialogs prompting for config info */
index 4853b5359b84264946f838ac3301595478a3ace7..5090e6296b90b144ce5d801a906d4cd5c1570e3f 100644 (file)
@@ -1693,12 +1693,16 @@ fails for any reason, ERROR is returned.
  19. Name of room to log express messages to (or a zero-length name for none)
  20. Access level required to create rooms
  21. Maximum message length which may be entered into the system
  19. Name of room to log express messages to (or a zero-length name for none)
  20. Access level required to create rooms
  21. Maximum message length which may be entered into the system
- 22. Default moderation filter level for new users (-63 to +63)
- 23. Flag (0 or 1) - allow Aides to zap (forget) rooms
-  
- EXPI   (EXPIre system objects)
+ 22. Minimum number of worker threads
+ 23. Maximum number of worker threads
+ 24. Port number for POP3 service
+ 25. Port number for SMTP service
+ 26. Default moderation filter level for new users (-63 to +63)
+ 27. Flag (0 or 1) - allow Aides to zap (forget) rooms
+ 28. Port number for IMAP service
+
+
+  EXPI   (EXPIre system objects)
  
  Begins purge operations for objects which, according to site policy, are
 "old" and should be removed.  EXPI should be called with one argument, one of:
  
  Begins purge operations for objects which, according to site policy, are
 "old" and should be removed.  EXPI should be called with one argument, one of: