From: mmj Date: Tue, 19 Jul 2005 09:10:04 +0000 (+1000) Subject: subonlyget and confirmation possible with closedlist X-Git-Tag: RELEASE_1_2_12_RC1~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b80dce676fbffa7dd39212c0e07217c479754a89;p=thirdparty%2Fmlmmj.git subonlyget and confirmation possible with closedlist --- diff --git a/ChangeLog b/ChangeLog index a867ffca..1ea81cf4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ + o Make it possible to confirm subscription even though it's a closedlist. + It makes sense to be able to confirm a request submitted by the sysadmin + on the commandline + o Add 'subonlyget' tunable which makes +get-N only work for subscribers 1.2.8 o Don't closedir() before done (GOOD spotting Christian Laursen) o Make sure the resend of queue files will not loop indefinately diff --git a/TUNABLES b/TUNABLES index 7b079ba3..7e861822 100644 --- a/TUNABLES +++ b/TUNABLES @@ -120,6 +120,11 @@ to specify several entries (one pr. line), it's marked "list". If this file exists, then retrieving old posts with +get-N is disabled + · subonlyget (boolean) + + If this file exists, then retrieving old posts with +get-N is only + possible for subscribers. The above mentioned 'noget' have precedence. + · verp (normal) Enable VERP support. Anything added in this variable will be appended the diff --git a/VERSION b/VERSION index db6fb4a9..9d4f8239 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.8 +1.2.9 diff --git a/src/listcontrol.c b/src/listcontrol.c index 58139758..bada1daf 100644 --- a/src/listcontrol.c +++ b/src/listcontrol.c @@ -44,6 +44,7 @@ #include "memory.h" #include "log_oper.h" #include "ctrlvalues.h" +#include "subscriberfuncs.h" enum ctrl_e { CTRL_SUBSCRIBE_DIGEST, @@ -106,7 +107,7 @@ int listcontrol(struct email_container *fromemails, const char *listdir, const char *subswitch; size_t len; struct stat stbuf; - int closedlist, nosubconfirm, tmpfd, noget, i; + int closedlist, nosubconfirm, tmpfd, noget, i, subonlyget = 0; size_t cmdlen; unsigned int ctrl; struct strlist *owners; @@ -241,8 +242,6 @@ int listcontrol(struct email_container *fromemails, const char *listdir, /* listname+subconf-digest-COOKIE@domain.tld */ case CTRL_CONFSUB_DIGEST: unlink(mailname); - if (closedlist) - exit(EXIT_SUCCESS); conffilename = concatstr(3, listdir, "/subconf/", param); myfree(param); if((tmpfd = open(conffilename, O_RDONLY)) < 0) { @@ -268,8 +267,6 @@ int listcontrol(struct email_container *fromemails, const char *listdir, /* listname+subconf-nomail-COOKIE@domain.tld */ case CTRL_CONFSUB_NOMAIL: unlink(mailname); - if (closedlist) - exit(EXIT_SUCCESS); conffilename = concatstr(3, listdir, "/subconf/", param); myfree(param); if((tmpfd = open(conffilename, O_RDONLY)) < 0) { @@ -295,8 +292,6 @@ int listcontrol(struct email_container *fromemails, const char *listdir, /* listname+subconf-COOKIE@domain.tld */ case CTRL_CONFSUB: unlink(mailname); - if (closedlist) - exit(EXIT_SUCCESS); conffilename = concatstr(3, listdir, "/subconf/", param); myfree(param); if((tmpfd = open(conffilename, O_RDONLY)) < 0) { @@ -532,6 +527,10 @@ int listcontrol(struct email_container *fromemails, const char *listdir, noget = statctrl(listdir, "noget"); if(noget) exit(EXIT_SUCCESS); + subonlyget = statctrl(listdir, "subonlyget"); + if(subonlyget) + if(is_subbed(listdir, fromemails->emaillist[0]) != 0) + exit(EXIT_SUCCESS); /* sanity check--is it all digits? */ for(c = param; *c != '\0'; c++) { if(!isdigit((int)*c))