diff -Nru mlmmj-1.2.13-RC1-orig/listtexts/de/maxmailsize mlmmj-1.2.13-RC1/listtexts/de/maxmailsize
--- mlmmj-1.2.13-RC1-orig/listtexts/de/maxmailsize	1970-01-01 01:00:00.000000000 +0100
+++ mlmmj-1.2.13-RC1/listtexts/de/maxmailsize	2006-12-11 14:54:49.000000000 +0100
@@ -0,0 +1,10 @@
+Subject: Beitrag zur Liste $listaddr$ wegen Größenüberschreitung abgelehnt
+
+Hallo, dies ist das mlmmj Programm das die Mailingliste
+
+$listaddr$
+
+verwaltet.
+
+Tut mir leid aber Ihre Mail konnte nicht versandt werden. Die von
+Ihnen verschickte Mail überschreitet das bestehende Größenlimit.
diff -Nru mlmmj-1.2.13-RC1-orig/listtexts/maxmailsize mlmmj-1.2.13-RC1/listtexts/maxmailsize
--- mlmmj-1.2.13-RC1-orig/listtexts/maxmailsize	1970-01-01 01:00:00.000000000 +0100
+++ mlmmj-1.2.13-RC1/listtexts/maxmailsize	2006-12-11 14:54:49.000000000 +0100
@@ -0,0 +1,11 @@
+Subject: Post to $listaddr$ denied due to size limit [was: "$oldsubject$"]
+
+Hi, this is the mlmmj program managing the mailinglist
+
+$listaddr$
+
+I'm sorry to inform you that your message could not be delivered to the
+list. Your mail was rejected due to the size limit of $maxmailsize$.
+
+Thanks.
+
diff -Nru mlmmj-1.2.13-RC1-orig/src/mlmmj-process.c mlmmj-1.2.13-RC1/src/mlmmj-process.c
--- mlmmj-1.2.13-RC1-orig/src/mlmmj-process.c	2006-12-06 14:19:09.000000000 +0100
+++ mlmmj-1.2.13-RC1/src/mlmmj-process.c	2006-12-11 14:58:09.000000000 +0100
@@ -348,7 +348,9 @@
 	int i, j, opt, noprocess = 0, moderated = 0;
 	int hdrfd, footfd, rawmailfd, donemailfd;
 	int subonlypost = 0, addrtocc = 1, intocc = 0, modnonsubposts = 0;
+	int maxmailsize = 0;
 	int notoccdenymails = 0, noaccessdenymails = 0, nosubonlydenymails = 0;
+	int nomaxmailsizedenymails = 0;
 	char *listdir = NULL, *mailfile = NULL, *headerfilename = NULL;
 	char *footerfilename = NULL, *donemailname = NULL;
 	char *randomstr = NULL, *mqueuename;
@@ -356,6 +358,7 @@
 	char *bindir, *subjectprefix, *discardname, *listaddr, *listdelim;
 	char *listfqdn, *listname, *fromaddr;
 	char *queuefilename, *recipextra = NULL, *owner = NULL;
+	char *maxmailsizestr;
 	char *maildata[2] = { "posteraddr", NULL };
 	char *envstr, *efrom;
 	struct stat st;
@@ -631,6 +634,74 @@
 		return EXIT_SUCCESS;
 	}
 
+	/* this declaration is needed here... */
+	listaddr = getlistaddr(listdir);
+	alternates = ctrlvalues(listdir, "listaddress");
+	
+	/* checking incoming mail's size */
+#if 0
+	log_error(LOG_ARGS, "%d", statctrl(listdir, "maxmailsize"));
+#endif
+	maxmailsize = statctrl(listdir, "maxmailsize");
+	if(maxmailsize) {
+		maxmailsizestr = ctrlvalue(listdir, "maxmailsize");
+		if(maxmailsizestr) {
+			maxmailsize = atol(maxmailsizestr);
+			myfree(maxmailsizestr);
+#if 0
+			log_error(LOG_ARGS, "max = %d", maxmailsize);
+#endif
+			if(stat(donemailname, &st) < 0) {
+				log_error(LOG_ARGS, "something went wrong"
+					" during stat(%s,..)", donemailname);
+			}
+			nomaxmailsizedenymails = statctrl(listdir, "nomaxmailsizedenymails");
+			if((st.st_size > maxmailsize) && nomaxmailsizedenymails) {
+#if 0
+				log_error(LOG_ARGS, "%d", nomaxmailsizedenymails);
+#endif
+				log_error(LOG_ARGS, "discarding mail %s due to"
+						" size limit (%d bytes too big) \n",
+						donemailname, (st.st_size - maxmailsize));
+				unlink(donemailname);
+				myfree(donemailname);
+				exit(EXIT_SUCCESS);
+			}
+			if((st.st_size > maxmailsize)) {
+#if 0
+				log_error(LOG_ARGS, "%s is %d bytes too big.\n",
+						donemailname,
+						(st.st_size - maxmailsize));
+#endif
+				listdelim = getlistdelim(listdir);
+				listname = genlistname(listaddr);
+				listfqdn = genlistfqdn(listaddr);
+				fromaddr = concatstr(4, listname, listdelim,
+						"bounces-help@", listfqdn);
+				queuefilename = prepstdreply(listdir,
+						"maxmailsize", "$listowner$",
+						fromemails.emaillist[0],
+						NULL, 0, NULL, NULL);
+				MY_ASSERT(queuefilename)
+				myfree(listdelim);
+				myfree(listname);
+				myfree(listfqdn);
+				unlink(donemailname);
+				myfree(donemailname);
+				execlp(mlmmjsend, mlmmjsend,
+						"-l", "1",
+						"-L", listdir,
+						"-T", fromemails.emaillist[0],
+						"-F", fromaddr,
+						"-m", queuefilename, (char *)NULL);
+	
+				log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjsend);
+				exit(EXIT_FAILURE);
+	
+			}
+		}
+	}
+
 	/* discard malformed mail with invalid From: */
 	if(fromemails.emailcount != 1) { 
 		for(i = 0; i < fromemails.emailcount; i++)
@@ -673,8 +744,9 @@
 
 	unlink(mailfile);
 
+	/* maxmailsize need this earlier...
 	listaddr = getlistaddr(listdir);
-	alternates = ctrlvalues(listdir, "listaddress");
+	alternates = ctrlvalues(listdir, "listaddress"); */
 
 	addrtocc = !(statctrl(listdir, "tocc"));
 	if(addrtocc) {
diff -Nru mlmmj-1.2.13-RC1-orig/TUNABLES mlmmj-1.2.13-RC1/TUNABLES
--- mlmmj-1.2.13-RC1-orig/TUNABLES	2006-12-10 16:00:09.000000000 +0100
+++ mlmmj-1.2.13-RC1/TUNABLES	2006-12-11 14:56:18.000000000 +0100
@@ -183,3 +183,13 @@
    If this file exists, subscription to the nomail version of the mailinglist
    will be denied. (Useful if you don't want to allow nomail and notify users
    about it).
+
+
+ · maxmailsize                        (normal)
+
+   With this option the maximal allowed size of incoming mails can be specified.
+
+ · nomaxmailsizedenymails     (boolean)
+
+   If this is set, no reject notifications caused by violation of maxmailsize
+   will be sent.

