From db0697e2c71d484cf9cc808a10ed1c02532af2d8 Mon Sep 17 00:00:00 2001 From: Dave West Date: Tue, 18 Mar 2008 21:12:03 +0000 Subject: [PATCH] Oops, managed to commit a partial change regarding the POP3 client interval. Here is the rest of it. Still to do are text client and documentation. --- citadel/config.c | 10 ++++++++++ citadel/control.c | 8 ++++++++ citadel/include/dtds/config-defs.h | 2 ++ 3 files changed, 20 insertions(+) diff --git a/citadel/config.c b/citadel/config.c index cc1e01091..830627043 100644 --- a/citadel/config.c +++ b/citadel/config.c @@ -117,6 +117,16 @@ void get_config(void) { if (config.c_net_freq < 300L) config.c_net_freq = 300L; + /* Same goes for POP3 */ + if (config.c_pop3_fetch == 0L) + config.c_pop3_fetch = 3600L; /* once per hour default */ + if (config.c_pop3_fetch < 300L) + config.c_pop3_fetch = 300L; + if (config.c_pop3_fastest == 0L) + config.c_pop3_fastest = 3600L; /* once per hour default */ + if (config.c_pop3_fastest < 300L) + config.c_pop3_fastest = 300L; + /* "create new user" only works with native authentication mode */ if (config.c_auth_mode != AUTHMODE_NATIVE) { config.c_disable_newu = 1; diff --git a/citadel/control.c b/citadel/control.c index 9e01aa8a1..d33db78de 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -333,6 +333,8 @@ void cmd_conf(char *argbuf) cprintf("%d\n", config.c_imap_keep_from); cprintf("%d\n", config.c_xmpp_c2s_port); cprintf("%d\n", config.c_xmpp_s2s_port); + cprintf("%ld\n", config.c_pop3_fetch); + cprintf("%ld\n", config.c_pop3_fastest); cprintf("000\n"); } @@ -580,6 +582,12 @@ void cmd_conf(char *argbuf) case 63: config.c_xmpp_s2s_port = atoi(buf); break; + case 64: + config.c_pop3_fetch = atol(buf); + break; + case 65: + config.c_pop3_fastest = atol(buf); + break; } ++a; } diff --git a/citadel/include/dtds/config-defs.h b/citadel/include/dtds/config-defs.h index 6deaa90c2..a71510faa 100644 --- a/citadel/include/dtds/config-defs.h +++ b/citadel/include/dtds/config-defs.h @@ -86,3 +86,5 @@ CFG_VALUE(STRING_BUF(c_pager_program, 256), " External pager program (blank to CFG_VALUE(CHAR(c_imap_keep_from), " IMAP keep original from header in msgs"); CFG_VALUE(INTEGER(c_xmpp_c2s_port), " XMPP client-to-server port (usually 5222)"); CFG_VALUE(INTEGER(c_xmpp_s2s_port), " XMPP server-to-server port (usually 5269)"); +CFG_VALUE(TIME(c_pop3_fetch), " How often to fetch POP3 messages"); +CFG_VALUE(TIME(c_pop3_fastest), " Users can specify POP3 fetching this often"); -- 2.30.2