🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.misc
Article #4234

Re: Sendmail loses mail ?

#4234
From: Lennart Lovstrand
Date: Mon, 25 May 1987 11:17
49 lines
2566 bytes
In article <1359@aw.sei.cmu.edu> pdb@sei.cmu.edu (Pat Barron) writes:
>Here's a rather interesting phenomenon I've noticed with Sendmail 5.54.  Every
>once in a while, for no readily apparent reason, it will drop a mail message
>without warning.  The symptom is that the 'qf' file in the queue directory
>mysteriously vanishes.  The 'df' file stays.  The message in question could
>be either one being delivered to a user on my machine, or one being sent from
>it.

There is a bug at least with the 5.51 release of sendmail which causes
the queue deamon to sometimes misbehave with locked entries.  It seems
to happen whenever the queue daemon ends up processing a locked entry as
its last for the run.

At first, the queue deamon leaves the files alone when it discoveres
that the lock file exists, but then it exists and while doing general
cleanup in finis/dropenvelope, it removes some [all?] of its current
envelope's queue files.  Especially if there is a another concurrently
running sendmail, the net result will only be a df file with the message
contents but no recipient/sender information.

The fix is to explicitly set the current envelope's id to NULL before
leaving the current queue pass, since it should not exist anyway.  The
following extremely small context-diff should cure the problem:

*** queue.c.orig	Fri Mar 13 18:51:03 1987
--- queue.c	Fri Apr 17 22:43:30 1987
***************
*** 352,357 ****
--- 353,362 ----
  		free(w->w_name);
  		free((char *) w);
  	}
+ 	/*
+ 	 *	Don't let dropenvelope() trash locked queue files!
+ 	 */
+ 	CurEnv->e_id = NULL;
  	finis();
  }
  /*

This about 0.3% of The IDA Sendmail Enhancement Kit, *now* ready for
distribution!  Read more about it in an accompanying article!

Cheers,
--Lennart
--
Dept of Computer and Information Science, University of Linkoping, Sweden
Internet: Lennart.Lovstrand@IDA.LiU.SE       EAN/X.400: lel@ida.liu.sunet
UUCP: {mcvax,munnari,seismo}!enea!liuida!lel    EARN/BITNET: LEL@SELIUI51
Technical Details
Message-ID: <564@crabbofix.liu.se>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!enea!liuida!lel
References: <1359@aw.sei.cmu.edu>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!enea!liuida!lel
From: lel@ida.liu.se (Lennart Lovstrand)
Newsgroups: comp.mail.misc
Subject: Re: Sendmail loses mail ?
Message-ID: <564@crabbofix.liu.se>
Date: Mon, 25-May-87 07:17:11 EDT
Article-I.D.: crabbofi.564
Posted: Mon May 25 07:17:11 1987
Date-Received: Tue, 26-May-87 02:00:49 EDT
References: <1359@aw.sei.cmu.edu>
Sender: lenlo@crabbofix.liu.se
Distribution: world
Organization: CIS Dept, Univ of Linkoping, Sweden
Lines: 49