From: mmj Date: Mon, 4 Dec 2006 17:24:27 +0000 (+1100) Subject: modnonsubposts X-Git-Tag: RELEASE_1_2_13_RC1~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6dddbb4a44d8f8483337f207755af957121f1f2;p=thirdparty%2Fmlmmj.git modnonsubposts --- diff --git a/ChangeLog b/ChangeLog index 10a9636c..a587a6e3 100644 --- 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() diff --git a/TUNABLES b/TUNABLES index 6b7ba293..c6bf0396 100644 --- 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 diff --git a/src/mlmmj-process.c b/src/mlmmj-process.c index e578ecb0..81589013 100644 --- a/src/mlmmj-process.c +++ b/src/mlmmj-process.c @@ -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");