Mercurial > hg > mlmmj
changeset 439:b75073f25e60
Add switches to control whether or not mlmmj sends out mails explaining
that posts got denied.
author | mmj |
---|---|
date | Tue, 25 Jan 2005 02:24:17 +1100 |
parents | 777c569d95b7 |
children | ba5a6cda33af |
files | ChangeLog TUNABLES src/mlmmj-process.c |
diffstat | 3 files changed, 28 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jan 25 01:44:40 2005 +1100 +++ b/ChangeLog Tue Jan 25 02:24:17 2005 +1100 @@ -1,3 +1,5 @@ +1.2.1 + o Introduce switches to turn off mails about posts being denied. 1.2.0 o Remove debug info printing 1.2.0-RC2
--- a/TUNABLES Tue Jan 25 01:44:40 2005 +1100 +++ b/TUNABLES Tue Jan 25 02:24:17 2005 +1100 @@ -119,3 +119,12 @@ · maxverprecips (normal) How many recipients pr. mail delivered to the smtp server. Defaults to 100. + + · notoccdenymails (boolean) + · noaccessdenymails (boolean) + · nosubonlydenymails (boolean) + + These switches turns off whether mlmmj sends out notification about postings + being denied due to the listaddress not being in To: or Cc: (see 'tocc'), + when it was rejected due to an access rule (see 'access') or whether it's a + subscribers only posting list (see 'subonlypost').
--- a/src/mlmmj-process.c Tue Jan 25 01:44:40 2005 +1100 +++ b/src/mlmmj-process.c Tue Jan 25 02:24:17 2005 +1100 @@ -312,6 +312,7 @@ int i, opt, noprocess = 0, moderated = 0; int hdrfd, footfd, rawmailfd, donemailfd; int subonlypost = 0, addrtocc = 1, intocc = 0; + int notoccdenymails = 0, noaccessdenymails = 0, nosubonlydenymails = 0; char *listdir = NULL, *mailfile = NULL, *headerfilename = NULL; char *footerfilename = NULL, *donemailname = NULL; char *randomstr = NULL, *mqueuename; @@ -611,10 +612,14 @@ intocc = 1; } + notoccdenymails = statctrl(listdir, "notoccdenymails"); + if(addrtocc && !intocc) { /* Don't send a mail about denial to the list, but silently - * discard and exit */ - if (strcasecmp(listaddr, fromemails.emaillist[0]) == 0) { + * discard and exit. Also don't in case of it being turned off + */ + if ((strcasecmp(listaddr, fromemails.emaillist[0]) == 0) || + notoccdenymails) { myfree(listaddr); unlink(donemailname); myfree(donemailname); @@ -641,11 +646,14 @@ 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 - * discard and exit */ - if (strcasecmp(listaddr, fromemails.emaillist[0]) == 0) { + * discard and exit. Do the same if it's turned off */ + if ((strcasecmp(listaddr, fromemails.emaillist[0]) == 0) + || nosubonlydenymails) { myfree(listaddr); unlink(donemailname); myfree(donemailname); @@ -677,12 +685,15 @@ } } + noaccessdenymails = statctrl(listdir, "noaccessdenymails"); + access_rules = ctrlvalues(listdir, "access"); if (access_rules) { enum action accret; /* Don't send a mail about denial to the list, but silently - * discard and exit */ - if (strcasecmp(listaddr, fromemails.emaillist[0]) == 0) { + * discard and exit. Also do this in case it's turned off */ + if ((strcasecmp(listaddr, fromemails.emaillist[0]) == 0) + || noaccessdenymails) { myfree(listaddr); unlink(donemailname); myfree(donemailname);