If the maintd visited more than one mail in the /requeue/ directory, and the
FIRST one set the fromrequeuedir flag to unlink the mail file, the flag was NOT
cleared and caused mail in the real archive to be erronously removed.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

diff -Nuar --exclude mlmmj-make-ml.sh mlmmj-1.2.16.orig/src/mlmmj-maintd.c mlmmj-1.2.16/src/mlmmj-maintd.c
--- mlmmj-1.2.16.orig/src/mlmmj-maintd.c	2008-10-31 14:20:51.000000000 +0000
+++ mlmmj-1.2.16/src/mlmmj-maintd.c	2009-12-16 02:11:16.848146214 +0000
@@ -373,7 +373,7 @@
 	struct stat st;
 	pid_t childpid, pid;
 	time_t t;
-	int status, fromrequeuedir = 0;
+	int status, fromrequeuedir;
 
 	if(chdir(dirname) < 0) {
 		log_error(LOG_ARGS, "Could not chdir(%s)", dirname);
@@ -408,6 +408,10 @@
 
 		archivefilename = concatstr(3, listdir, "/archive/",
 						dp->d_name);
+
+		/* Explicitly initialize for each mail we examine */
+		fromrequeuedir = 0;
+
 		if(stat(archivefilename, &st) < 0) {
 			/* Might be it's just not moved to the archive
 			 * yet because it's still getting sent, so just


