[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

premature "unlink" in router/rfc822.c



I have recently learned that we have been loosing messages
due to a mail-loop problem.  While I think I have got the
loop under control, the loss of messages concerned me.
In investigating it appears that the crux of the problem
is that the sequencer() function in router/rfc822.c had
an inappropriate call to eunlink() added either in 2.99.15
or 2.99.16 (it wasn't in .14, it is in .16 and .27; I don't
have a local copy of .15 to check and it isn't worth the
bandwidth to me to find out for sure).

The problem, highlighed here by a diff between .14 and .16:

@@ -1099,5 +1111,7 @@
 
 	/* put pertinent message information in the zsh environment */
 	setenvinfo(e);
-	if (perr)
+	if (perr) {
+		eunlink(file);
 		return perr;
+	}


The problem with this unlink is that the squirrel() function
has not yet been called at this point; the run_rfc822()
function calls the sequencer(), and then, based on a switch
on the return code, will call squirrel() for such cases as
PERR_LOOP (among others).  I'm not sure what problem this
unlink was intended to solve (no mention of it is in the
ChangeLog), but it definitely breaks things to have it here.

		--Ken Pizzini