]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Add a tunable for moderation request lifetime.
authorBen Schmidt <none@none>
Mon, 3 Feb 2014 22:06:05 +0000 (09:06 +1100)
committerBen Schmidt <none@none>
Mon, 3 Feb 2014 22:06:05 +0000 (09:06 +1100)
--HG--
extra : rebase_source : f31a9d0c0c9875f7fc860fd654c9a4520343c9ee

TUNABLES
src/mlmmj-maintd.c

index ba5c67cc1abfd611f6e8591234d9b8c2f7a0b5e1..749ff702796ee3750d443e55ed5a83782d732141 100644 (file)
--- a/TUNABLES
+++ b/TUNABLES
@@ -50,6 +50,11 @@ entire content is used as value, it's marked "text".
    When this file is present, all postings from people who are not subscribed
    to the list will be moderated.
 
+ · modreqlife                 (normal)
+
+   This specifies how long in seconds a mail awaits moderation before it's
+   discarded. Defaults to 604800 seconds, which is 7 days.
+
  · prefix                     (normal)
 
    The prefix for the Subject: line of mails to the list. This will alter the
@@ -121,8 +126,8 @@ entire content is used as value, it's marked "text".
 
  · bouncelife                 (normal)
 
-   Here is specified for how long time in seconds an address can bounce before
-   it's unsubscribed. Defaults to 432000 seconds, which is 5 days.
+   This specifies how long in seconds an address can bounce before it's
+   unsubscribed. Defaults to 432000 seconds, which is 5 days.
 
  · noarchive                  (boolean)
 
@@ -132,12 +137,12 @@ entire content is used as value, it's marked "text".
  · nosubconfirm                       (boolean)
 
    If this file exists, no mail confirmation is needed to subscribe to the
-   list. This should in principle never ever be used, but there is times
+   list. This should in principle never ever be used, but there are times
    on local lists etc. where this is useful. HANDLE WITH CARE!
 
  · noget                      (boolean)
 
-   If this file exists, then retrieving old posts with +get-N is disabled
+   If this file exists, then retrieving old posts with +get-N is disabled.
 
  · subonlyget                 (boolean)
 
index 66297219011a84f7a16afec73165d35d8f92e0cf..99ea01a78c35ab4771b128cd51a86260839dd9a6 100644 (file)
@@ -137,8 +137,20 @@ int delolder(const char *dirname, time_t than)
 
 int clean_moderation(const char *listdir)
 {
+
+       time_t modreqlife = 0;
+       char *modreqlifestr;
+
+       modreqlifestr = ctrlvalue(listdir, "modreqlife");
+       if(modreqlifestr) {
+               modreqlife = atol(modreqlifestr);
+               myfree(modreqlifestr);
+       }
+       if(modreqlife == 0)
+               modreqlife = MODREQLIFE;
+
        char *moddirname = concatstr(2, listdir, "/moderation");
-       int ret = delolder(moddirname, MODREQLIFE);     
+       int ret = delolder(moddirname, modreqlife);
                
        myfree(moddirname);