]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
modnonsubposts
authormmj <none@none>
Mon, 4 Dec 2006 17:24:27 +0000 (04:24 +1100)
committermmj <none@none>
Mon, 4 Dec 2006 17:24:27 +0000 (04:24 +1100)
ChangeLog
TUNABLES
src/mlmmj-process.c

index 10a9636ceb267dd4a612bf7c94def51d1bae2352..a587a6e33d55036f5fe48fe3c8a881bff33a75cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+ o Add 'modnonsubposts' tunable that when set will moderate all posts
+   from non subscribers
  o Fixed requeue for lists with noarchive enabled
 1.2.12
  o Fixed memory corruption in cleanquotedp()
index 6b7ba293fd5ae1dda6f0dce8fc3813f6ea44c374..c6bf0396788a36e6db4d5c4b352e29c4ba70ab1f 100644 (file)
--- a/TUNABLES
+++ b/TUNABLES
@@ -44,6 +44,11 @@ to specify several entries (one pr. line), it's marked "list".
    When this file is present, only people who are subscribed to the list,
    are allowed to post to it. The check is made against the "From:" header.
 
+ · modnonsubposts              (boolean)
+
+   When this file is present, all postings from people who are not subscribed
+   to the list will be moderated.
+
  · prefix                      (normal)
 
    The prefix for the Subject: line of mails to the list. This will alter the
index e578ecb0ba939bedfec1a46c944133115ac8551f..815890135a3e0147fb2c660f689c8eb6975a07c0 100644 (file)
@@ -347,7 +347,7 @@ int main(int argc, char **argv)
 {
        int i, j, opt, noprocess = 0, moderated = 0;
        int hdrfd, footfd, rawmailfd, donemailfd;
-       int subonlypost = 0, addrtocc = 1, intocc = 0;
+       int subonlypost = 0, addrtocc = 1, intocc = 0, modnonsubposts = 0;
        int notoccdenymails = 0, noaccessdenymails = 0, nosubonlydenymails = 0;
        char *listdir = NULL, *mailfile = NULL, *headerfilename = NULL;
        char *footerfilename = NULL, *donemailname = NULL;
@@ -742,8 +742,6 @@ int main(int argc, char **argv)
                exit(EXIT_FAILURE);
        }
 
-       nosubonlydenymails = statctrl(listdir, "nosubonlydenymails");
-
        subonlypost = statctrl(listdir, "subonlypost");
        if(subonlypost) {
                /* Don't send a mail about denial to the list, but silently
@@ -759,6 +757,16 @@ int main(int argc, char **argv)
                        exit(EXIT_SUCCESS);
                }
                if(is_subbed(listdir, fromemails.emaillist[0]) != 0) {
+                       modnonsubposts = statctrl(listdir,
+                                       "modnonsubposts");
+                       if(modnonsubposts) {
+                               moderated = 1;
+                               goto startaccess;
+                       }
+                       
+                       nosubonlydenymails = statctrl(listdir,
+                                       "nosubonlydenymails");
+
                        if(nosubonlydenymails) {
                                log_error(LOG_ARGS, "Discarding %s because"
                                                " subonlypost and"
@@ -796,6 +804,7 @@ int main(int argc, char **argv)
                }
        }
 
+startaccess:
        noaccessdenymails = statctrl(listdir, "noaccessdenymails");
 
        access_rules = ctrlvalues(listdir, "access");