Add the FULLBOUNCE config option to include the full message in the bounce.

--- a/conf.c
+++ b/conf.c
@@ -250,6 +250,8 @@
 				config->features |= DEFER;
 			else if (strcmp(word, "INSECURE") == 0)
 				config->features |= INSECURE;
+			else if (strcmp(word, "FULLBOUNCE") == 0)
+				config->features |= FULLBOUNCE;
 		}
 	}
 
--- a/dma.8
+++ b/dma.8
@@ -237,6 +237,11 @@
 .Ar queueid
 .Fl f
 .Ar messagefile
+.It Ic FULLBOUNCE Xo
+(boolean, default=commented)
+.Xc
+Uncomment if you want the bounce message to include the complete original
+message, not just the headers.
 .El
 .Ss virtusertable
 The
--- a/dma.c
+++ b/dma.c
@@ -584,7 +584,7 @@
 \n\
 %s\n\
 \n\
-Message headers follow.\n\
+%s\n\
 \n\
 ",
 		bounceq.id,
@@ -596,7 +596,9 @@
 		rfc822date(),
 		VERSION, hostname(),
 		it->addr,
-		reason);
+		reason,
+		config->features & FULLBOUNCE? "Original message follows.":
+		"Message headers follow.");
 	free(reason);
 	if (error < 0)
 		goto fail;
@@ -605,14 +607,20 @@
 
 	if (fseek(it->queuef, it->hdrlen, SEEK_SET) != 0)
 		goto fail;
-	while (!feof(it->queuef)) {
-		if (fgets(line, sizeof(line), it->queuef) == NULL)
-			break;
-		if (line[0] == '\n')
-			break;
-		if (write(bounceq.mailfd, line, strlen(line)) != strlen(line))
-			goto fail;
-	}
+	if (config->features & FULLBOUNCE)
+		while ((pos = fread(line, 1, sizeof(line), it->queuef)) > 0) {
+			if (write(bounceq.mailfd, line, pos) != pos)
+				goto fail;
+		}
+	else
+		while (!feof(it->queuef)) {
+			if (fgets(line, sizeof(line), it->queuef) == NULL)
+				break;
+			if (line[0] == '\n')
+				break;
+			if (write(bounceq.mailfd, line, strlen(line)) != strlen(line))
+				goto fail;
+		}
 	if (fsync(bounceq.mailfd) != 0)
 		goto fail;
 	if (linkspool(&bounceq) != 0)
--- a/dma.h
+++ b/dma.h
@@ -72,6 +72,7 @@
 #define NOSSL		0x008		/* Do not use SSL */
 #define DEFER		0x010		/* Defer mails */
 #define INSECURE	0x020		/* Allow plain login w/o encryption */
+#define FULLBOUNCE	0x040		/* Bounce the full message */
 
 #define CONF_PATH	"/etc/dma/dma.conf"	/* Default path to dma.conf */
 
--- a/etc/dma.conf
+++ b/etc/dma.conf
@@ -45,3 +45,7 @@
 # default behavior of simply aborting the delivery, or specify the name or
 # full path to a program that will process the double-bounce message.
 #DBOUNCEPROG
+
+# Uncomment if you want the bounce message to include the complete original
+# message, not just the headers.
+#FULLBOUNCE
