Oops, managed to commit a partial change regarding the POP3 client
authorDave West <davew@uncensored.citadel.org>
Tue, 18 Mar 2008 21:12:03 +0000 (21:12 +0000)
committerDave West <davew@uncensored.citadel.org>
Tue, 18 Mar 2008 21:12:03 +0000 (21:12 +0000)
interval. Here is the rest of it.
Still to do are text client and documentation.

citadel/config.c
citadel/control.c
citadel/include/dtds/config-defs.h

index cc1e01091fd86a81ff836e8840f6afb1884c3156..830627043ded7b399fe8e6a87331cd2ca0ada482 100644 (file)
@@ -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;
index 9e01aa8a1a216ffa0a88292ba2f36c4585fb477e..d33db78dedd4dd1860cb65115d3d9d25a3ced3c6 100644 (file)
@@ -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;
                }
index 6deaa90c21fcfa82db8d159403ea7686c623b601..a71510faab0d3d17cef32bbf07119635c626e740 100644 (file)
@@ -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");