Skip to contentSkip to conversation

mlmmj more verbose access denied mails

PATCH In review Sascha Sommer 2 participants 5 messages Oct 30, 2007 – Nov 8, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mlmmj more verbose access denied mails

Hi,

the attached patch adds another parameter to the prepheader function. This parameter can be used to pass the filename of the mail that is going to be rejected.

If the parameter is set the first 100 lines of the rejected mail will be appended to the reply.

I implemented this for the rejections due to maxmailsize, access denied and list adress not passed in the to cases.
What do you think?

Regards

Sascha

P.S. The mails will then look like:

"Hi, this is the mlmmj program managing the mailinglist

[email protected]

I'm sorry to inform you that your message could not be delivered to the list. Your mail was rejected because it matched a rule set up by the list administrator.

Thanks.

X-Original-To: [email protected]
Delivered-To: [email protected]
Received: by cuba.sommer.dynalias.net (Postfix, from userid 1000) id 56FB719B3AC; Mon, 29 Oct 2007 18:13:03 +0100 (CET)
From: Sascha Sommer <[email protected]>
To: [email protected]
Subject: test4
User-Agent: KMail/1.9.6 (enterprise 20070904.708012)
MIME-Version: 1.0
Content-Disposition: inline
Date: Mon, 29 Oct 2007 18:13:02 +0100
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <[email protected]>

blah blah blah
"

include/prepstdreply.h renamed from mlmmj-1.2.15/include/prepstdreply.h +1 -1
diff -Naur org/mlmmj-1.2.15/include/prepstdreply.h mlmmj-1.2.15/include/prepstdreply.h
@@ -31,6 +31,6 @@
 int open_listtext(const char *listdir, const char *filename);
 char *prepstdreply(const char *listdir, const char *filename, const char *from,
 		   const char *to, const char *replyto, size_t tokencount,
-		   char **data, char *customheaders);
+		   char **data, char *customheaders, const char *mailname);
 
 #endif /* PREPSTDREPLY_H */
src/mlmmj-bounce.c renamed from mlmmj-1.2.15/src/mlmmj-bounce.c +1 -1
diff -Naur org/mlmmj-1.2.15/src/mlmmj-bounce.c mlmmj-1.2.15/src/mlmmj-bounce.c
@@ -139,7 +139,7 @@
 
 	maildata[1] = indexstr;
 	queuefilename = prepstdreply(listdir, "bounce-probe", "$listowner$",
-					myaddr, NULL, 1, maildata, NULL);
+					myaddr, NULL, 1, maildata, NULL, NULL);
 	MY_ASSERT(queuefilename);
 	myfree(indexstr);
 
src/mlmmj-process.c renamed from mlmmj-1.2.15/src/mlmmj-process.c +5 -5
diff -Naur org/mlmmj-1.2.15/src/mlmmj-process.c mlmmj-1.2.15/src/mlmmj-process.c
@@ -123,7 +123,7 @@
 	myfree(listfqdn);
 
 	queuefilename = prepstdreply(listdir, "moderation", "$listowner$",
-				     to, replyto, 2, maildata, NULL);
+				     to, replyto, 2, maildata, NULL, NULL);
 
 	if((queuefd = open(queuefilename, O_WRONLY|O_APPEND)) < 0) {
 		log_error(LOG_ARGS, "Could not open '%s'", queuefilename);
@@ -657,7 +657,7 @@
 			queuefilename = prepstdreply(listdir,
 					"maxmailsize", "$listowner$",
 					fromemails.emaillist[0],
-					NULL, 2, maildata, NULL);
+					NULL, 2, maildata, NULL, donemailname);
 			MY_ASSERT(queuefilename)
 			myfree(listdelim);
 			myfree(listname);
@@ -768,7 +768,7 @@
 				     listfqdn);
 		queuefilename = prepstdreply(listdir, "notintocc",
 					"$listowner$", fromemails.emaillist[0],
-					     NULL, 0, NULL, NULL);
+					     NULL, 0, NULL, NULL, donemailname);
 		MY_ASSERT(queuefilename)
 		myfree(listdelim);
 		myfree(listname);
@@ -829,7 +829,7 @@
 					"bounces-help@", listfqdn);
 			queuefilename = prepstdreply(listdir, "subonlypost",
 					"$listowner$", fromemails.emaillist[0],
-						     NULL, 1, maildata, NULL);
+						     NULL, 1, maildata, NULL, donemailname);
 			MY_ASSERT(queuefilename)
 			myfree(listaddr);
 			myfree(listdelim);
@@ -880,7 +880,7 @@
 			queuefilename = prepstdreply(listdir, "access",
 							"$listowner$",
 							fromemails.emaillist[0],
-						     NULL, 0, NULL, NULL);
+						     NULL, 0, NULL, NULL, donemailname);
 			MY_ASSERT(queuefilename)
 			myfree(listaddr);
 			myfree(listdelim);
src/mlmmj-sub.c renamed from mlmmj-1.2.15/src/mlmmj-sub.c +6 -6
diff -Naur org/mlmmj-1.2.15/src/mlmmj-sub.c mlmmj-1.2.15/src/mlmmj-sub.c
@@ -147,7 +147,7 @@
 	maildata[5] = moderators;
 
 	queuefilename = prepstdreply(listdir, "submod-moderator",
-				"$listowner$", to, replyto, 3, maildata, NULL);
+				"$listowner$", to, replyto, 3, maildata, NULL, NULL);
 	
 	myfree(maildata[1]);
 	
@@ -181,7 +181,7 @@
 
 	from = concatstr(4, listname, listdelim, "bounces-help@", listfqdn);
 	queuefilename = prepstdreply(listdir, "submod-requester", "$listowner$",
-					subaddr, NULL, 0, NULL, NULL);
+					subaddr, NULL, 0, NULL, NULL, NULL);
 	
 	myfree(listname);
 	myfree(listfqdn);
@@ -274,7 +274,7 @@
 	}
 
 	queuefilename = prepstdreply(listdir, listtext, "$helpaddr$",
-				     subaddr, NULL, 0, NULL, NULL);
+				     subaddr, NULL, 0, NULL, NULL, NULL);
 	MY_ASSERT(queuefilename);
 	myfree(listtext);
 
@@ -321,7 +321,7 @@
 	}
 
 	queuefilename = prepstdreply(listdir, listtext, "$listowner$",
-				"$listowner$", NULL, 1, maildata, NULL);
+				"$listowner$", NULL, 1, maildata, NULL, NULL);
 	MY_ASSERT(queuefilename)
 	myfree(listtext);
 	myfree(maildata[1]);
@@ -408,7 +408,7 @@
 	maildata[3] = mystrdup(confirmaddr);
 
 	queuefilename = prepstdreply(listdir, listtext, "$helpaddr$", subaddr,
-				     confirmaddr, 2, maildata, NULL);
+				     confirmaddr, 2, maildata, NULL, NULL);
 
 	myfree(maildata[1]);
 	myfree(maildata[3]);
@@ -460,7 +460,7 @@
 	myfree(listdelim);
 
 	queuefilename = prepstdreply(listdir, "sub-subscribed", "$helpaddr$",
-				     subaddr, NULL, 0, NULL, NULL);
+				     subaddr, NULL, 0, NULL, NULL, NULL);
 	MY_ASSERT(queuefilename);
 
 	myfree(listaddr);
src/mlmmj-unsub.c renamed from mlmmj-1.2.15/src/mlmmj-unsub.c +4 -4
diff -Naur org/mlmmj-1.2.15/src/mlmmj-unsub.c mlmmj-1.2.15/src/mlmmj-unsub.c
@@ -76,7 +76,7 @@
 	}
 
 	queuefilename = prepstdreply(listdir, listtext, "$helpaddr$",
-				     subaddr, NULL, 0, NULL, NULL);
+				     subaddr, NULL, 0, NULL, NULL, NULL);
 	MY_ASSERT(queuefilename);
 	myfree(listtext);
 
@@ -124,7 +124,7 @@
 	}
 	
 	queuefilename = prepstdreply(listdir, listtext, "$listowner$",
-				     "$listowner$", NULL, 1, maildata, NULL);
+				     "$listowner$", NULL, 1, maildata, NULL, NULL);
 	MY_ASSERT(queuefilename);
 	myfree(listtext);
 	myfree(maildata[1]);
@@ -213,7 +213,7 @@
 	maildata[3] = mystrdup(confirmaddr);
 
 	queuefilename = prepstdreply(listdir, listtext, "$helpaddr$", subaddr,
-				     confirmaddr, 2, maildata, NULL);
+				     confirmaddr, 2, maildata, NULL, NULL);
 
 	myfree(maildata[1]);
 	myfree(maildata[3]);
@@ -305,7 +305,7 @@
 	myfree(listdelim);
 
 	queuefilename = prepstdreply(listdir, "unsub-notsubscribed",
-				     "$helpaddr$", subaddr, NULL, 0, NULL, NULL);
+				     "$helpaddr$", subaddr, NULL, 0, NULL, NULL, NULL);
 	MY_ASSERT(queuefilename);
 
 	myfree(listaddr);
src/prepstdreply.c renamed from mlmmj-1.2.15/src/prepstdreply.c +26 -2
diff -Naur org/mlmmj-1.2.15/src/prepstdreply.c mlmmj-1.2.15/src/prepstdreply.c
@@ -187,9 +187,9 @@
 
 char *prepstdreply(const char *listdir, const char *filename, const char *from,
 		   const char *to, const char *replyto, size_t tokencount,
-		   char **data, char *customheaders)
+		   char **data, char *customheaders, const char *mailname)
 {
-	int infd, outfd;
+	int infd, outfd, mailfd;
 	char *listaddr, *listdelim, *myfrom, *tmp, *subject, *retstr = NULL;
 	char *listfqdn, *line, *utfline, *utfsub, *utfsub2;
 	char *myreplyto, *myto, *str = NULL, *mydate, *mymsgid;
@@ -198,6 +198,12 @@
 		return NULL;
 	}
 
+        if (mailname) {
+	   if((mailfd = open(mailname, O_RDONLY)) < 0) {
+		return NULL;
+	   }
+	}
+
 	listaddr = getlistaddr(listdir);
 	listdelim = getlistdelim(listdir);
 	listfqdn = genlistfqdn(listaddr);
@@ -310,6 +316,24 @@
 		}
 		myfree(str);
 	}
+
+	/* append the mail inline */
+	if(mailname) {
+		size_t count = 0;
+		while(count < 100 && (str = mygetline(mailfd))) {
+			if(writen(outfd, str, strlen(str)) < 0) {
+				myfree(str);
+				myfree(listaddr);
+				myfree(listdelim);
+				myfree(listfqdn);
+				log_error(LOG_ARGS, "Could not append mail");
+				return NULL;
+			}
+			myfree(str);
+			count++;
+		}
+		close(mailfd);
+	}
 	
 	fsync(outfd);
 	close(outfd);
src/send_help.c renamed from mlmmj-1.2.15/src/send_help.c +1 -1
diff -Naur org/mlmmj-1.2.15/src/send_help.c mlmmj-1.2.15/src/send_help.c
@@ -57,7 +57,7 @@
 	myfree(listdelim);
 
 	queuefilename = prepstdreply(listdir, textfile, "$listowner$",
-					emailaddr, NULL, 0, NULL, NULL);
+					emailaddr, NULL, 0, NULL, NULL, NULL);
 	if(queuefilename == NULL) {
 		log_error(LOG_ARGS, "Could not prepare %s mail", name);
 		exit(EXIT_FAILURE);
src/send_list.c renamed from mlmmj-1.2.15/src/send_list.c +1 -1
diff -Naur org/mlmmj-1.2.15/src/send_list.c mlmmj-1.2.15/src/send_list.c
@@ -61,7 +61,7 @@
 	myfree(listdelim);
 
 	queuefilename = prepstdreply(listdir, "listsubs", "$listowner$",
-					emailaddr, NULL, 0, NULL, NULL);
+					emailaddr, NULL, 0, NULL, NULL, NULL);
 	if(queuefilename == NULL) {
 		log_error(LOG_ARGS, "Could not prepare sub list mail");
 		exit(EXIT_FAILURE);
#1 lore raw

Hi Sascha,

Sorry about the delay.

Quoted 3 lines · Sascha Sommer

the attached patch adds another parameter to the prepheader function. This parameter can be used to pass the filename of the mail that is going to be rejected.

Thanks for the patch. I like the idea.

Perhaps you could extend it a bit, with support for a keyword (or magic line, to ease implementation) in the listtext files? Something like this:

---
Subject: Post to $listaddr$ denied due to size limit [...]
Thanks.

This mail was generated in response to the following mail:
$original-mail$
---

As it is now, the original mail is just appended without any information about what it is.

I know that it is a bit more work, but I think it would add a lot of value :-)

Morten

Signature · 2 lines
Morten K. Poulsen <[email protected]>
http://www.afdelingp.dk/
#2 lore raw
In reply to Sascha Sommer

Hi,

Quoted 4 lines · Morten K. Poulsen

Hi Sascha,

Sorry about the delay.

No problem. Thanks for the review.

Quoted 19 lines
Quoted 3 lines · Sascha Sommer

the attached patch adds another parameter to the prepheader function. This parameter can be used to pass the filename of the mail that is going to be rejected.

Thanks for the patch. I like the idea.

Perhaps you could extend it a bit, with support for a keyword (or magic line, to ease implementation) in the listtext files? Something like this:

---
Subject: Post to $listaddr$ denied due to size limit [...]
Thanks.

This mail was generated in response to the following mail:
$original-mail$
---

Quoted 6 lines

As it is now, the original mail is just appended without any information about what it is.

I know that it is a bit more work, but I think it would add a lot of value :-)

Ok. See the attached patch.
The keyword $originalmail$ can now be set in the
access
maxmailsize
moderation
notintocc
subonlypost

listtext files. If set the first 100 lines of the denied mail will be attached.
I also removed the code that currently does the same for the moderation case and made it use the new keyword.

Only the de and en listtexts have been updated.

Regards

Sascha

include/prepstdreply.h +3 -3
diff -Naur mlmmj-1.2.15.org/include/prepstdreply.h mlmmj-1.2.15/include/prepstdreply.h
@@ -25,12 +25,12 @@
 #define PREPSTDREPLY_H
 
 char *substitute(const char *line, const char *listaddr, const char *listdelim,
-		 size_t datacount, char **data);
+		 size_t datacount, char **data, const char* mailname);
 char *substitute_one(const char *line, const char *listaddr,
-		 const char *listdelim, size_t datacount, char **data);
+		 const char *listdelim, size_t datacount, char **data, const char* mailname);
 int open_listtext(const char *listdir, const char *filename);
 char *prepstdreply(const char *listdir, const char *filename, const char *from,
 		   const char *to, const char *replyto, size_t tokencount,
-		   char **data, char *customheaders);
+		   char **data, char *customheaders, const char *mailname);
 
 #endif /* PREPSTDREPLY_H */
listtexts/de/access +3 -0
diff -Naur mlmmj-1.2.15.org/listtexts/de/access mlmmj-1.2.15/listtexts/de/access
@@ -10,3 +10,6 @@
 Filter, den der Administrator dieser Liste aufgesetzt hat, traf 
 auf Ihre Mail zu.
 
+--- Unterhalb dieser Linie sehen Sie die ersten 100 Zeilen der abgelehnten Nachricht. --->
+$originalmail$
+
listtexts/de/maxmailsize +4 -0
diff -Naur mlmmj-1.2.15.org/listtexts/de/maxmailsize mlmmj-1.2.15/listtexts/de/maxmailsize
@@ -9,3 +9,7 @@
 Tut mir leid aber Ihre Mail konnte nicht versandt werden. Die von
 Ihnen verschickte Mail \u00FCberschreitet das bestehende Gr\u00F6\u00DFenlimit
 von $maxmailsize$ Bytes.
+
+--- Unterhalb dieser Linie sehen Sie die ersten 100 Zeilen der abgelehnten Nachricht. --->
+$originalmail$
+
listtexts/de/moderation +2 -0
diff -Naur mlmmj-1.2.15.org/listtexts/de/moderation mlmmj-1.2.15/listtexts/de/moderation
@@ -23,3 +23,5 @@
 $moderators$
 
 --- Unterhalb dieser Linie sehen Sie die ersten 100 Zeilen der Nachricht, welche moderiert werden muss. --->
+$orignalmail$
+
listtexts/de/notintocc +3 -0
diff -Naur mlmmj-1.2.15.org/listtexts/de/notintocc mlmmj-1.2.15/listtexts/de/notintocc
@@ -14,3 +14,6 @@
 
 Danke.
 
+--- Unterhalb dieser Linie sehen Sie die ersten 100 Zeilen der abgelehnten Nachricht. --->
+$originalmail$
+
listtexts/de/subonlypost +3 -0
diff -Naur mlmmj-1.2.15.org/listtexts/de/subonlypost mlmmj-1.2.15/listtexts/de/subonlypost
@@ -26,3 +26,6 @@
 sind, Nachrichten an die Liste schicken zu k\u00F6nnen, tragen Sie die neue
 Adresse bitte auf die Nomail-Version dieser Liste ein.
 
+--- Unterhalb dieser Linie sehen Sie die ersten 100 Zeilen der abgelehnten Nachricht. --->
+$originalmail$
+
listtexts/en/access +3 -0
diff -Naur mlmmj-1.2.15.org/listtexts/en/access mlmmj-1.2.15/listtexts/en/access
@@ -10,3 +10,6 @@
 
 Thanks.
 
+--- below this line the first 100 lines of the denied message --->
+$originalmail$
+
listtexts/en/maxmailsize +3 -0
diff -Naur mlmmj-1.2.15.org/listtexts/en/maxmailsize mlmmj-1.2.15/listtexts/en/maxmailsize
@@ -9,3 +9,6 @@
 
 Thanks.
 
+--- below this line the first 100 lines of the denied message --->
+$originalmail$
+
listtexts/en/moderation +2 -0
diff -Naur mlmmj-1.2.15.org/listtexts/en/moderation mlmmj-1.2.15/listtexts/en/moderation
@@ -19,3 +19,5 @@
 $moderators$
 
 --- below this line the first 100 lines of the message up for moderation --->
+$originalmail$
+
listtexts/en/notintocc +3 -0
diff -Naur mlmmj-1.2.15.org/listtexts/en/notintocc mlmmj-1.2.15/listtexts/en/notintocc
@@ -12,3 +12,6 @@
 
 Thanks.
 
+--- below this line the first 100 lines of the denied message --->
+$originalmail$
+
listtexts/en/subonlypost +3 -0
diff -Naur mlmmj-1.2.15.org/listtexts/en/subonlypost mlmmj-1.2.15/listtexts/en/subonlypost
@@ -18,3 +18,6 @@
 If you want to be able to post from more than one email address, you
 can subscribe the other addresses to the nomail version of the list.
 
+--- below this line the first 100 lines of the denied message --->
+$originalmail$
+
src/mlmmj-bounce.c +1 -1
diff -Naur mlmmj-1.2.15.org/src/mlmmj-bounce.c mlmmj-1.2.15/src/mlmmj-bounce.c
@@ -139,7 +139,7 @@
 
 	maildata[1] = indexstr;
 	queuefilename = prepstdreply(listdir, "bounce-probe", "$listowner$",
-					myaddr, NULL, 1, maildata, NULL);
+					myaddr, NULL, 1, maildata, NULL, NULL);
 	MY_ASSERT(queuefilename);
 	myfree(indexstr);
 
src/mlmmj-process.c +6 -30
diff -Naur mlmmj-1.2.15.org/src/mlmmj-process.c mlmmj-1.2.15/src/mlmmj-process.c
@@ -76,8 +76,7 @@
 	char *buf, *replyto, *listaddr = getlistaddr(listdir), *listdelim;
 	char *queuefilename = NULL, *moderatorsfilename;
 	char *mailbasename = mybasename(mailfilename), *tmp, *to;
-	int queuefd, moderatorsfd, mailfd;
-	size_t count = 0;
+	int moderatorsfd;
 	char *maildata[4] = { "moderateaddr", NULL, "moderators", NULL };
 #if 0
 	printf("mailfilename = [%s], mailbasename = [%s]\n", mailfilename,
@@ -86,11 +85,6 @@
 	listfqdn = genlistfqdn(listaddr);
 	listname = genlistname(listaddr);
 
-	if((mailfd = open(mailfilename, O_RDONLY)) < 0) {
-		log_error(LOG_ARGS, "Could not open '%s'", mailfilename);
-		exit(EXIT_FAILURE);
-	}
-
 	moderatorsfilename = concatstr(2, listdir, "/control/moderators");
 	if((moderatorsfd = open(moderatorsfilename, O_RDONLY)) < 0) {
 		log_error(LOG_ARGS, "Could not open '%s'", moderatorsfilename);
@@ -123,25 +117,7 @@
 	myfree(listfqdn);
 
 	queuefilename = prepstdreply(listdir, "moderation", "$listowner$",
-				     to, replyto, 2, maildata, NULL);
-
-	if((queuefd = open(queuefilename, O_WRONLY|O_APPEND)) < 0) {
-		log_error(LOG_ARGS, "Could not open '%s'", queuefilename);
-		myfree(queuefilename);
-		exit(EXIT_FAILURE);
-	}
-	
-	while(count < 100 && (buf = mygetline(mailfd))) {
-		tmp = concatstr(2, " ", buf);
-		myfree(buf);
-		if(writen(queuefd, tmp, strlen(tmp)) < 0)
-			log_error(LOG_ARGS, "Could not write line for "
-					    "moderatemail");
-		myfree(tmp);
-		count++;
-	}
-	close(queuefd);
-	close(mailfd);
+				     to, replyto, 2, maildata, NULL, mailfilename);
 
 	execlp(mlmmjsend, mlmmjsend,
 				"-l", "2",
@@ -657,7 +633,7 @@
 			queuefilename = prepstdreply(listdir,
 					"maxmailsize", "$listowner$",
 					fromemails.emaillist[0],
-					NULL, 2, maildata, NULL);
+					NULL, 2, maildata, NULL, donemailname);
 			MY_ASSERT(queuefilename)
 			myfree(listdelim);
 			myfree(listname);
@@ -768,7 +744,7 @@
 				     listfqdn);
 		queuefilename = prepstdreply(listdir, "notintocc",
 					"$listowner$", fromemails.emaillist[0],
-					     NULL, 0, NULL, NULL);
+					     NULL, 0, NULL, NULL, donemailname);
 		MY_ASSERT(queuefilename)
 		myfree(listdelim);
 		myfree(listname);
@@ -829,7 +805,7 @@
 					"bounces-help@", listfqdn);
 			queuefilename = prepstdreply(listdir, "subonlypost",
 					"$listowner$", fromemails.emaillist[0],
-						     NULL, 1, maildata, NULL);
+						     NULL, 1, maildata, NULL, donemailname);
 			MY_ASSERT(queuefilename)
 			myfree(listaddr);
 			myfree(listdelim);
@@ -880,7 +856,7 @@
 			queuefilename = prepstdreply(listdir, "access",
 							"$listowner$",
 							fromemails.emaillist[0],
-						     NULL, 0, NULL, NULL);
+						     NULL, 0, NULL, NULL, donemailname);
 			MY_ASSERT(queuefilename)
 			myfree(listaddr);
 			myfree(listdelim);
src/mlmmj-sub.c +6 -6
diff -Naur mlmmj-1.2.15.org/src/mlmmj-sub.c mlmmj-1.2.15/src/mlmmj-sub.c
@@ -147,7 +147,7 @@
 	maildata[5] = moderators;
 
 	queuefilename = prepstdreply(listdir, "submod-moderator",
-				"$listowner$", to, replyto, 3, maildata, NULL);
+				"$listowner$", to, replyto, 3, maildata, NULL, NULL);
 	
 	myfree(maildata[1]);
 	
@@ -181,7 +181,7 @@
 
 	from = concatstr(4, listname, listdelim, "bounces-help@", listfqdn);
 	queuefilename = prepstdreply(listdir, "submod-requester", "$listowner$",
-					subaddr, NULL, 0, NULL, NULL);
+					subaddr, NULL, 0, NULL, NULL, NULL);
 	
 	myfree(listname);
 	myfree(listfqdn);
@@ -274,7 +274,7 @@
 	}
 
 	queuefilename = prepstdreply(listdir, listtext, "$helpaddr$",
-				     subaddr, NULL, 0, NULL, NULL);
+				     subaddr, NULL, 0, NULL, NULL, NULL);
 	MY_ASSERT(queuefilename);
 	myfree(listtext);
 
@@ -321,7 +321,7 @@
 	}
 
 	queuefilename = prepstdreply(listdir, listtext, "$listowner$",
-				"$listowner$", NULL, 1, maildata, NULL);
+				"$listowner$", NULL, 1, maildata, NULL, NULL);
 	MY_ASSERT(queuefilename)
 	myfree(listtext);
 	myfree(maildata[1]);
@@ -408,7 +408,7 @@
 	maildata[3] = mystrdup(confirmaddr);
 
 	queuefilename = prepstdreply(listdir, listtext, "$helpaddr$", subaddr,
-				     confirmaddr, 2, maildata, NULL);
+				     confirmaddr, 2, maildata, NULL, NULL);
 
 	myfree(maildata[1]);
 	myfree(maildata[3]);
@@ -460,7 +460,7 @@
 	myfree(listdelim);
 
 	queuefilename = prepstdreply(listdir, "sub-subscribed", "$helpaddr$",
-				     subaddr, NULL, 0, NULL, NULL);
+				     subaddr, NULL, 0, NULL, NULL, NULL);
 	MY_ASSERT(queuefilename);
 
 	myfree(listaddr);
src/mlmmj-unsub.c +4 -4
diff -Naur mlmmj-1.2.15.org/src/mlmmj-unsub.c mlmmj-1.2.15/src/mlmmj-unsub.c
@@ -76,7 +76,7 @@
 	}
 
 	queuefilename = prepstdreply(listdir, listtext, "$helpaddr$",
-				     subaddr, NULL, 0, NULL, NULL);
+				     subaddr, NULL, 0, NULL, NULL, NULL);
 	MY_ASSERT(queuefilename);
 	myfree(listtext);
 
@@ -124,7 +124,7 @@
 	}
 	
 	queuefilename = prepstdreply(listdir, listtext, "$listowner$",
-				     "$listowner$", NULL, 1, maildata, NULL);
+				     "$listowner$", NULL, 1, maildata, NULL, NULL);
 	MY_ASSERT(queuefilename);
 	myfree(listtext);
 	myfree(maildata[1]);
@@ -213,7 +213,7 @@
 	maildata[3] = mystrdup(confirmaddr);
 
 	queuefilename = prepstdreply(listdir, listtext, "$helpaddr$", subaddr,
-				     confirmaddr, 2, maildata, NULL);
+				     confirmaddr, 2, maildata, NULL, NULL);
 
 	myfree(maildata[1]);
 	myfree(maildata[3]);
@@ -305,7 +305,7 @@
 	myfree(listdelim);
 
 	queuefilename = prepstdreply(listdir, "unsub-notsubscribed",
-				     "$helpaddr$", subaddr, NULL, 0, NULL, NULL);
+				     "$helpaddr$", subaddr, NULL, 0, NULL, NULL, NULL);
 	MY_ASSERT(queuefilename);
 
 	myfree(listaddr);
src/prepstdreply.c +32 -11

94 lines not on this page · raw message

src/send_digest.c +2 -2
diff -Naur mlmmj-1.2.15.org/src/send_digest.c mlmmj-1.2.15/src/send_digest.c
@@ -263,7 +263,7 @@
 		utfsub = unistr_escaped_to_utf8(line + 9);
 	}
 
-	utfsub2 = substitute(utfsub, listaddr, listdelim, 5, subst_data);
+	utfsub2 = substitute(utfsub, listaddr, listdelim, 5, subst_data, NULL);
 	subject = unistr_utf8_to_header(utfsub2);
 	myfree(utfsub);
 	myfree(utfsub2);
@@ -362,7 +362,7 @@
 				myfree(line);
 
 				tmp = substitute(utfline, listaddr, listdelim,
-						5, subst_data);
+						5, subst_data, NULL);
 				myfree(utfline);
 
 				if(writen(fd, tmp, strlen(tmp)) < 0) {
src/send_help.c +1 -1
diff -Naur mlmmj-1.2.15.org/src/send_help.c mlmmj-1.2.15/src/send_help.c
@@ -57,7 +57,7 @@
 	myfree(listdelim);
 
 	queuefilename = prepstdreply(listdir, textfile, "$listowner$",
-					emailaddr, NULL, 0, NULL, NULL);
+					emailaddr, NULL, 0, NULL, NULL, NULL);
 	if(queuefilename == NULL) {
 		log_error(LOG_ARGS, "Could not prepare %s mail", name);
 		exit(EXIT_FAILURE);
src/send_list.c +1 -1
diff -Naur mlmmj-1.2.15.org/src/send_list.c mlmmj-1.2.15/src/send_list.c
@@ -61,7 +61,7 @@
 	myfree(listdelim);
 
 	queuefilename = prepstdreply(listdir, "listsubs", "$listowner$",
-					emailaddr, NULL, 0, NULL, NULL);
+					emailaddr, NULL, 0, NULL, NULL, NULL);
 	if(queuefilename == NULL) {
 		log_error(LOG_ARGS, "Could not prepare sub list mail");
 		exit(EXIT_FAILURE);
#3 lore raw
In reply to Sascha Sommer

Hi Sascha,

Quoted 3 lines · Sascha Sommer
Quoted 2 lines · Morten K. Poulsen

Perhaps you could extend it a bit, with support for a keyword (or magic line, to ease implementation) in the listtext files? Something like this:

[...]

Quoted 1 line

Ok. See the attached patch.

Thanks! I have committed it to CVS.

So, all translation maintainers, please update the following listtexts:
- access
- maxmailsize
- moderation
- notintocc
- subonlypost

to include two lines like this:

--- below this line are the first 100 lines of the denied message ---> $originalmail$

Thanks :-)

Best regards,
Morten

Signature · 2 lines
Morten K. Poulsen <[email protected]>
http://www.afdelingp.dk/
#4 lore raw
In reply to Sascha Sommer

Hi,

Quoted 8 lines · Morten K. Poulsen

Hi Sascha,

Quoted 4 lines · Sascha Sommer
Quoted 3 lines · Morten K. Poulsen

Perhaps you could extend it a bit, with support for a keyword (or magic line, to ease implementation) in the listtext files? Something like this:

Quoted 6 lines

[...]

Quoted 1 line

Ok. See the attached patch.

Thanks! I have committed it to CVS.

Thanks.

Regards

Sascha