changeset 562:0e6215f03447

Bugfix for submod -- now it works
author mmj
date Mon, 04 Sep 2006 06:55:41 +1000
parents 16f1746469b1
children 9f6c46b77910
files src/listcontrol.c src/mlmmj-process.c src/mlmmj-sub.c
diffstat 3 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/listcontrol.c	Mon Sep 04 05:12:37 2006 +1000
+++ b/src/listcontrol.c	Mon Sep 04 06:55:41 2006 +1000
@@ -196,6 +196,10 @@
 		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 @@
 				fromemails->emaillist[0], moderatefilename);
 			execlp(mlmmjsub, mlmmjsub,
 					"-L", listdir,
-					"-m", param, (char *)NULL);
+					"-m", param,
+					"-c", (char *)NULL);
 		}
 
 		sendfilename = concatstr(2, moderatefilename, ".sending");
--- a/src/mlmmj-process.c	Mon Sep 04 05:12:37 2006 +1000
+++ b/src/mlmmj-process.c	Mon Sep 04 06:55:41 2006 +1000
@@ -578,7 +578,6 @@
 		listcontrol(&fromemails, listdir, whichto->emaillist[0],
 			    mlmmjsub, mlmmjunsub, mlmmjsend, mlmmjbounce,
 			    donemailname);
-		unlink(donemailname);
 
 		return EXIT_SUCCESS;
 	}
--- a/src/mlmmj-sub.c	Mon Sep 04 05:12:37 2006 +1000
+++ b/src/mlmmj-sub.c	Mon Sep 04 06:55:41 2006 +1000
@@ -538,12 +538,12 @@
 	}
 
 	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);