changeset 609:56785a0b38b6

changed send_help() to accept the name and textfile as arguments (Henne Vogelsang)
author mortenp
date Thu, 07 Dec 2006 08:29:27 +1100
parents 921ccfaf14f2
children af32f7ed5d3d
files include/send_help.h src/listcontrol.c src/send_help.c
diffstat 3 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/include/send_help.h	Thu Dec 07 04:47:35 2006 +1100
+++ b/include/send_help.h	Thu Dec 07 08:29:27 2006 +1100
@@ -25,6 +25,6 @@
 #define SEND_HELP_H
 
 void send_help(const char *listdir, const char *emailaddr,
-	       const char *mlmmjsend);
+	       const char *mlmmjsend, const char *name, const char *textfile);
 
 #endif
--- a/src/listcontrol.c	Thu Dec 07 04:47:35 2006 +1100
+++ b/src/listcontrol.c	Thu Dec 07 08:29:27 2006 +1100
@@ -625,7 +625,7 @@
 		}
 		log_oper(listdir, OPLOGFNAME, "%s requested help",
 				fromemails->emaillist[0]);
-		send_help(listdir, fromemails->emaillist[0], mlmmjsend);
+		send_help(listdir, fromemails->emaillist[0], mlmmjsend, "help", "listhelp");
 		break;
 
 	/* listname+get-INDEX@domain.tld */
--- a/src/send_help.c	Thu Dec 07 04:47:35 2006 +1100
+++ b/src/send_help.c	Thu Dec 07 08:29:27 2006 +1100
@@ -43,7 +43,7 @@
 #include "memory.h"
 
 void send_help(const char *listdir, const char *emailaddr,
-	       const char *mlmmjsend)
+	       const char *mlmmjsend, const char *name, const char *textfile)
 {
 	char *queuefilename, *listaddr, *listdelim, *listname, *listfqdn;
 	char *fromaddr;
@@ -56,10 +56,10 @@
 	fromaddr = concatstr(4, listname, listdelim, "bounces-help@", listfqdn);
 	myfree(listdelim);
 
-	queuefilename = prepstdreply(listdir, "listhelp", "$listowner$",
+	queuefilename = prepstdreply(listdir, textfile, "$listowner$",
 					emailaddr, NULL, 0, NULL, NULL);
 	if(queuefilename == NULL) {
-		log_error(LOG_ARGS, "Could not prepare help mail");
+		log_error(LOG_ARGS, "Could not prepare %s mail", name);
 		exit(EXIT_FAILURE);
 	}