From 138a2521635cd34d1b35071fd70daa38ca57b78f Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 17 Oct 2000 15:22:44 +0000 Subject: [PATCH] * Added IMAP port number to struct config, etc. --- citadel/citadel.h | 1 + citadel/control.c | 3 +++ citadel/routines2.c | 9 +++++---- citadel/serv_imap.c | 2 +- citadel/setup.c | 3 ++- citadel/techdoc/session.txt | 16 ++++++++++------ 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/citadel/citadel.h b/citadel/citadel.h index 5ec5d4890..3a8580011 100644 --- a/citadel/citadel.h +++ b/citadel/citadel.h @@ -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_imap_port; /* IMAP listener port (usually 143) */ }; #define NODENAME config.c_nodename diff --git a/citadel/control.c b/citadel/control.c index 0f595289a..26ea7d330 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -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_imap_port); cprintf("000\n"); } @@ -262,6 +263,8 @@ void cmd_conf(char *argbuf) { if (config.c_aide_zap != 0) config.c_aide_zap = 1; break; + case 27: config.c_imap_port = atoi(buf); + break; } ++a; } diff --git a/citadel/routines2.c b/citadel/routines2.c index 212bcd3df..e3f69c470 100644 --- a/citadel/routines2.c +++ b/citadel/routines2.c @@ -625,7 +625,7 @@ void read_bio(void) 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; @@ -640,7 +640,7 @@ void do_system_configuration(void) 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; } @@ -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("POP3 server port (-1 to disable)", &sc[23][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 */ @@ -748,7 +749,7 @@ void do_system_configuration(void) 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"); } diff --git a/citadel/serv_imap.c b/citadel/serv_imap.c index 3d40c54ce..738cec226 100644 --- a/citadel/serv_imap.c +++ b/citadel/serv_imap.c @@ -403,7 +403,7 @@ void imap_command_loop(void) { 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); diff --git a/citadel/setup.c b/citadel/setup.c index 16e275156..a64ee0767 100644 --- a/citadel/setup.c +++ b/citadel/setup.c @@ -849,8 +849,9 @@ int main(int argc, char *argv[]) /* * 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_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 */ diff --git a/citadel/techdoc/session.txt b/citadel/techdoc/session.txt index 4853b5359..5090e6296 100644 --- a/citadel/techdoc/session.txt +++ b/citadel/techdoc/session.txt @@ -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 - 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: -- 2.30.2