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

Re: 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:
> 
> 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.

	Oops...   That explains many mystic feeling disappearances..

	The current use of  postman,  and  deferred  subdirs is
	a bit unclear -- the diffs I got from you do create an
	effect that all  squirrel():lled  messages are effectively
	MOVED to the  $POSTOFFICE/postman/  directory.
	Formely they were COPIED (by means of hard-linking), and
	the processing did continue.

	The  defer()  moves file into   $POSTOFFICE/deferred/
	directory, from where it becomes moved back via a cron-job
	(at least in here..)

	I am getting a feeling that there needs to be a third
	directory; one which is for: "Fix these before they are
	processable!"  (Deferred until corrected)

	Any suggestions for the name of such a directory ?
	(Below I use "troubled"..)

	Naturally we COULD use  'postman'  in that effect, but then
	everybody must change their current behaviour from "well,
	it is just junk" to "lets fix them, and resubmit"..

--> deferred	-- DNS/other DB temporary errors, time might fix them
		   (thus automatic resubmit works)
--> troubled	-- Some permanent errors in them, like errors in the
		   headers ?   The "maxReceived exceeded" should be
		   processed elsewere, though..
--> postman	-- products of squirrel() -- nonfatal bugs at headers

> 		--Ken Pizzini

	/Matti Aarnio <mea@nic.funet.fi> <mea@utu.fi>