]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Sanity checks
authormmj <none@none>
Tue, 14 Sep 2004 09:22:41 +0000 (19:22 +1000)
committermmj <none@none>
Tue, 14 Sep 2004 09:22:41 +0000 (19:22 +1000)
ChangeLog
src/mlmmj-process.c

index 4cdaed58c7d2745cbf854a7b89fe17bc069eb1cf..c0037ad6a54bbec2a21aaa0d927e6f7b3a28790a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+ o Add sanity checks to disallow denial mails going to the list
  o Implement -d option for mlmmj-maintd to be able to supply it with a directory
    containing several listdirs, where mlmmj-maintd then will run maintenance
  o Chown option and a fix for mlmmj-make-ml.sh. Thanks Ingo Lameter
index 492587622ec4ddabf9e0b3ba54c6bce73c4ff061..a91bebda63c303ba934d323299bd7618d5291549 100644 (file)
@@ -595,6 +595,15 @@ int main(int argc, char **argv)
        }
 
        if(addrtocc && !intocc) {
+               /* Don't send a mail about denial to the list, but silently
+                * discard and exit */
+               if (strncasecmp(listaddress, fromemails.emaillist[0],
+                               strlen(listaddress)) == 0) {
+                       myfree(listaddr);
+                       unlink(donemailname);
+                       myfree(donemailname);
+                       exit(EXIT_SUCCESS);
+               }
                listname = genlistname(listaddr);
                listfqdn = genlistfqdn(listaddr);
                maildata[0] = "*LSTADDR*";
@@ -625,6 +634,15 @@ int main(int argc, char **argv)
 
        subonlypost = statctrl(listdir, "subonlypost");
        if(subonlypost) {
+               /* Don't send a mail about denial to the list, but silently
+                * discard and exit */
+               if (strncasecmp(listaddress, fromemails.emaillist[0],
+                               strlen(listaddress)) == 0) {
+                       myfree(listaddr);
+                       unlink(donemailname);
+                       myfree(donemailname);
+                       exit(EXIT_SUCCESS);
+               }
                if(is_subbed(listdir, fromemails.emaillist[0]) != 0) {
                        listname = genlistname(listaddr);
                        listfqdn = genlistfqdn(listaddr);
@@ -661,6 +679,15 @@ int main(int argc, char **argv)
 
        access_rules = ctrlvalues(listdir, "access");
        if (access_rules) {
+               /* Don't send a mail about denial to the list, but silently
+                * discard and exit */
+               if (strncasecmp(listaddress, fromemails.emaillist[0],
+                               strlen(listaddress)) == 0) {
+                       myfree(listaddr);
+                       unlink(donemailname);
+                       myfree(donemailname);
+                       exit(EXIT_SUCCESS);
+               }
                if (do_access(access_rules, &allheaders) == DENY) {
                        listname = genlistname(listaddr);
                        listfqdn = genlistfqdn(listaddr);