]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Bugfix for submod -- now it works
authormmj <none@none>
Sun, 3 Sep 2006 20:55:41 +0000 (06:55 +1000)
committermmj <none@none>
Sun, 3 Sep 2006 20:55:41 +0000 (06:55 +1000)
src/listcontrol.c
src/mlmmj-process.c
src/mlmmj-sub.c

index 4197f50d79bd69453322ca02aed4713e1cb66035..cae701b64b05a6442ddc91fdb8352ad565f96946 100644 (file)
@@ -196,6 +196,10 @@ int listcontrol(struct email_container *fromemails, const char *listdir,
                return -1;
        }
 
+       /* We only need the control mail when bouncing, to save bounced msg */
+       if(ctrl != CTRL_BOUNCES)
+               unlink(mailname);
+
        switch (ctrl) {
 
        /* listname+subscribe-digest@domain.tld */
@@ -591,7 +595,8 @@ int listcontrol(struct email_container *fromemails, const char *listdir,
                                fromemails->emaillist[0], moderatefilename);
                        execlp(mlmmjsub, mlmmjsub,
                                        "-L", listdir,
-                                       "-m", param, (char *)NULL);
+                                       "-m", param,
+                                       "-c", (char *)NULL);
                }
 
                sendfilename = concatstr(2, moderatefilename, ".sending");
index f50dde22a7aec4dc8682e8e2f6917e62ae8fc63f..de3a6c8150a78a449f773c571ca6d400c9944858 100644 (file)
@@ -578,7 +578,6 @@ int main(int argc, char **argv)
                listcontrol(&fromemails, listdir, whichto->emaillist[0],
                            mlmmjsub, mlmmjunsub, mlmmjsend, mlmmjbounce,
                            donemailname);
-               unlink(donemailname);
 
                return EXIT_SUCCESS;
        }
index 43975152e4ae066711dadc2972444a8c7ae02a7c..b1bf63c94fa34e3ab585bff6c820913851bcf08f 100644 (file)
@@ -538,12 +538,12 @@ int main(int argc, char **argv)
        }
 
        if(listdir == NULL) {
-               fprintf(stderr, "You have to specify -L and -a\n");
+               fprintf(stderr, "You have to specify -L\n");
                fprintf(stderr, "%s -h for help\n", argv[0]);
                exit(EXIT_FAILURE);
        }
        
-       if(address == NULL || modstr == NULL) {
+       if(address == NULL && modstr == NULL) {
                fprintf(stderr, "You have to specify -a or -m\n");
                fprintf(stderr, "%s -h for help\n", argv[0]);
                exit(EXIT_FAILURE);