Subject: Bug#4326: smail can lose bounce messages

From: Ian Jackson <[email-masked]>
Date: Wed, 28 Aug 96 18:28 BST

Package: smail
Version: 3.1.29.1-14

Under certain obscure circumstances Smail can lose mail:

When it needs to send a bounce message it reinvokes itself with the
`-bS' flag, meaning to read SMTP commands from standard input but not
to produce responses.  It then feeds an SMTP `session' to the
subprocess.  Now, smail never produces error responses to
syntactically valid input (unlike, for example, some sendmails which
will fail a RCPT TO on a user that they think is local to them but is
unknown).

However, the subprocess may fail for some other reason.  Perhaps the
copy of Smail it wishes to reinvoke cannot be found, or has some
configuration error serious enough to cause it to fail to write the
message anywhere.

In this case the parent smail will write the message into its child
anyway and fail to notice the non-zero exit status.

I have reproduced the problem with a test setup under controlled
conditions, and can provide strace logs &c.

I'm not sure what happens if the disk is full.

Ian.