]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Add switches to control whether or not mlmmj sends out mails explaining
authormmj <none@none>
Mon, 24 Jan 2005 15:24:17 +0000 (02:24 +1100)
committermmj <none@none>
Mon, 24 Jan 2005 15:24:17 +0000 (02:24 +1100)
that posts got denied.

ChangeLog
TUNABLES
src/mlmmj-process.c

index 5294636c46bfcad27aec58acb1c6dba3fae4dd0f..1dfe293989c303e6ddb40c1bd1f16222f2c93a3c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 4f070fc4e1f623b1ae9806b791c01cb7d9898c82..424136a8ef642b09ff05ee60c04955957c585951 100644 (file)
--- a/TUNABLES
+++ b/TUNABLES
@@ -119,3 +119,12 @@ to specify several entries (one pr. line), it's marked "list".
  · 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').
index 6362be3313e73e24645213c7b023e61b14473cd5..e0d756e566544970d2c24057c626a9fcc149e345 100644 (file)
@@ -312,6 +312,7 @@ int main(int argc, char **argv)
        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 @@ int main(int argc, char **argv)
                                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 @@ 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
-                * 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 @@ int main(int argc, char **argv)
                }
        }
 
+       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);