[comp.mail.sendmail] Mail received by wrong persons ...

rpartha@cadev4.intel.com (Rajan Parthasarathy ~) (01/27/89)

We have been experiencing a problem with mail. Mail is getting delivered to 
people who are not on the address list.  The problem has happens infrequently,
and is not reproducible.  We are running Ultrix V2.2 and VMS 4.6 at our site.

Some common features of the problem are :

1. All occurrences were from an Ultrix V2.2 machine. The unintended recepients
   were both on Ultrix and VMS.

2. Addresses of unintended people were not in the mail header.

2. In all known cases, the mailer used was Elm. It is not known if it
    has happened with other mailers.

3. The mails never got returned to the sender, i.e. no error messages.  It
    is not known if all of the intended people received the mails.

Has anybody else experienced this/similar problem ? Any suggestions,
comments on how to isolate or fix the problem ?

Thanks 

Rajan


--------------------------------------
Disclaimer: The above are my personal opinions. 

UUCP:{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!cadev4!rpartha
ARPA:rpartha%cadev4.intel.com@relay.cs.net
CSNET:rpartha@cadev4.intel.com

dave@csd4.milw.wisc.edu (David A Rasmussen) (01/28/89)

From article <3494@mipos3.intel.com>, by rpartha@cadev4.intel.com (Rajan Parthasarathy ~):
> 
> We have been experiencing a problem with mail. Mail is getting delivered to 
> people who are not on the address list.  The problem has happens infrequently,
> and is not reproducible.  We are running Ultrix V2.2 and VMS 4.6 at our site.
> 
> Some common features of the problem are :
> 
> 1. All occurrences were from an Ultrix V2.2 machine. The unintended recepients
>    were both on Ultrix and VMS.
> 
> 2. Addresses of unintended people were not in the mail header.
> 
> 2. In all known cases, the mailer used was Elm. It is not known if it
>     has happened with other mailers.
> 
> 3. The mails never got returned to the sender, i.e. no error messages.  It
>     is not known if all of the intended people received the mails.
> 
> Has anybody else experienced this/similar problem ? Any suggestions?

I am running elm at a 4.3 bsd-tahoe site. The same thing happens here
periodically. The current elm does not use flock() for locking, but I don't
know if this is causing problems with other mailers (sendmail, ucbmail, etc).

I got a sendmail log of the last time this happened to me. I had elm'd a 
message to a user mary, and then what looked like a reply to a student and our
consulting alias got the same message (and my were they confused). Anyhow,
not being a sendmail guru, I wonder if anyone sees anything the matter in
the following section of logfile?  I thought perhaps elm generated a temp file
name with the same uid, and sendmail sent one file with that uid and then
saw it again and redelivered it with the wrong addresses, but that was just
an initial guess that I didn't verify yet.

Anyways, here is the section of the logfile. My message to mary is 667 bytes.

Jan 25 11:43:14 csd4 sendmail[22336]: AA22336: message-id=<8901251743.AA22336@csd4.milw.wisc.edu>
Jan 25 11:43:14 csd4 sendmail[22336]: AA22336: from=dave, size=984, class=0
Jan 25 11:43:18 csd4 sendmail[22347]: AA22336: to=pbhyf!rob@pacbell.pacbell.com, delay=00:00:06, stat=Deferred: Host Name Lookup Failure
Jan 25 11:43:19 csd4 sendmail[22347]: AA22336: to=elm-dev@dsinc.uucp, delay=00:00:07, stat=Deferred: Host Name Lookup Failure
Jan 25 11:45:00 csd4 sendmail[22563]: AA22563: message-id=<8901251744.AA22563@csd4.milw.wisc.edu>
Jan 25 11:45:02 csd4 sendmail[22563]: AA22563: from=dave, size=667, class=0
Jan 25 11:45:03 csd4 sendmail[22497]: AA22497: message-id=<8901251744.AA22497@csd4.milw.wisc.edu>
Jan 25 11:45:04 csd4 sendmail[22497]: AA22497: from=dave, size=667, class=0
Jan 25 11:45:08 csd4 sendmail[22589]: AA22563: to=mary, delay=00:00:12, stat=Sent
Jan 25 11:45:53 csd4 sendmail[22665]: AA22665: message-id=<8901251745.AA22665@csd4.milw.wisc.edu>
Jan 25 11:46:22 csd4 sendmail[22718]: AA22718: from=dave, size=606, class=0
Jan 25 11:46:25 csd4 sendmail[22595]: AA22497: to=sasasam,mary,ed,eniko,dav,brunelli,jeff,brooks,neil,jgd,james,doug,david,andrew,young,davep,eric,harrison,wayne,steve,scott,floyd,erchul,davidc,davec,keith,terri,warren,gary,amit,jvm,stetzer,tracyo,tom,inglem,ms, delay=00:02:02, stat=Sent
Jan 25 11:46:26 csd4 sendmail[22737]: AA22718: to=mary, delay=00:00:10, stat=Sent
Jan 25 11:46:27 csd4 sendmail[22595]: AA22497: to=lu@elsinore, delay=00:02:04, stat=Deferred: Host Name Lookup Failure
Jan 25 11:46:29 csd4 sendmail[22595]: AA22497: to=jiang,bruno,jandelyn,aadcs, delay=00:02:06, stat=Sent
--
Dave Rasmussen c/o Computing Services Division @ U of WI - Milwaukee
Internet: dave@csd4.milw.wisc.edu  Uucp: uwvax!uwmcsd1!uwmcsd4!dave {o,o}
Any opinions expressed are my own.  Now, for a limited time, they can be yours
too, for the incredible price of only $19.95.

rob@pbhyf.PacBell.COM (Rob Bernardo) (01/30/89)

In article <616@csd4.milw.wisc.edu> dave@csd4.milw.wisc.edu (David A Rasmussen) writes:
+From article <3494@mipos3.intel.com>, by rpartha@cadev4.intel.com (Rajan Parthasarathy ~):
+> 
+> We have been experiencing a problem with mail. Mail is getting delivered to 
+> people who are not on the address list.  The problem has happens infrequently,
+> and is not reproducible.  We are running Ultrix V2.2 and VMS 4.6 at our site.
+> 
+> Some common features of the problem are :
...
+> 2. In all known cases, the mailer used was Elm. It is not known if it
+>     has happened with other mailers.
+I am running elm at a 4.3 bsd-tahoe site. The same thing happens here
+periodically.
+
+I got a sendmail log of the last time this happened to me. I had elm'd a 
+message to a user mary, and then what looked like a reply to a student and our
+consulting alias got the same message (and my were they confused). Anyhow,
+not being a sendmail guru, I wonder if anyone sees anything the matter in
+the following section of logfile?  I thought perhaps elm generated a temp file
+name with the same uid, and sendmail sent one file with that uid and then
+saw it again and redelivered it with the wrong addresses, but that was just
+an initial guess that I didn't verify yet.

AHA! When ELM prepares a message to send out it writes the message to
a temp file and then executes something more or less like:
	([mail transport agent; rm [tempfilename]) <[tempfilename] &

Since the tempfilename is based on the process id and since
the mailing and deleting  of the tempfile is done  *in the background*,
if you send more than one message within a single  elm session in quick
succession,  it is possible that the elm could overwrite one message
with the contents of the next message before  you mail transport agent
read it and sent it off.

I don't have ELM 2.1 sources, so I can't produce the patch to fix
this, but if you want to patch this,  look in the source file mailmsg2.c.
Generate the temp file name using something like tempnam(3S) rather
than getpid(). I will effect the change in the version of ELM currently
under development.

Disclaimer: this is no doubt a bug in ELM, but not necessarily the source
of the problem mentioned above.
-- 
Rob Bernardo, Pacific Bell UNIX/C Reusable Code Library
Email:     ...![backbone]!pacbell!pbhyf!rob   OR  rob@pbhyf.PacBell.COM
Office:    (415) 823-2417  Room 4E750A, San Ramon Valley Administrative Center
Residence: (415) 827-4301  R Bar JB, Concord, California