Hello.

Ralph Corderoy <[email protected]> wrote:
 |s-nail 14.8.10-1.
 |
 |I'm running mail(1) with script(1) and there's a race between mail
 |forking so the child can run sendmail, the parent mail doesn't wait for
 |the child, and script seeing the parent mail has finished and stopping.

This "parent mail doesn't wait for the child" will be circumvented
by "set sendwait".  I think i will break standard compatibility
and enable this by default in the global .rc in v14.9.

 |A SIGHUP can stop sendmail being run.  syslog shows no entries for the
 |mail and it's lost.

Unfortunately even with *sendwait* the best that will happen is
savings of that corpse in _that_ $DEAD, _if_ *save* is set (which
the standard mandates as a default, though).

I long have had entries in (at least the brain-cell backed) TODO
which allows postponing of messages in general and some
quarantine, "zombie" storage, i.e., some kind of "staging" area,
for anything which is not yet acknowledged.  (I mean, saving in
there would also fail unless we would _not_ prepare into some
temporary file, but use that area for this purpose.)  Of course it
won't be that easy since "sending a single message" may
effectively result in multiple messages being sent, if we will
encrypt for some receivers for example, but in general sending
will _never_ be an atomic operation.

Yet our code paths don't allow this, let aside easily and without
ugly hackery, but which would make future changes even harder.  So
need to wait here, sic and sigh.  So to say.
It is always very frustrating to see that almost anything is there
already, but interlinked in a way that just doesn't allow something
supposedly simple, like, e.g., "< mime-message-with-attachments
mailx -blablabla".

 |Most of the time, it works fine, but, especially for small emails, the
 |mail doesn't get sent and there's no diagnostic.  I looked for a `no
 |fork, stay in foreground' option, but didn't spot anything.  Suggestions
 |welcome.  :-)

"set sendwait"?
Ciao!

--steffen

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
__________________________________
[email protected]

Reply via email to