emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sendmail.el bug or expected behavior?


From: Ian Jackson
Subject: Re: sendmail.el bug or expected behavior?
Date: Fri, 23 Jan 2004 12:29:55 +0000

Simon Josefsson writes ("Re: sendmail.el bug or expected behavior?"):
> I suspect that if the MTA is trying to deliver the message to its
> final destination, then it may hang regardless of what MTA is used.

IMO the correct way for a MUA to invoke sendmail (on Debian) is
  /usr/sbin/sendmail -odb -oee ...
(To be portable to non-FHS systems, use /usr/lib/sendmail)

This is supposed to
 (a) queue the message, exiting non-0 if unsuccessful
 (b) fork off a detached delivery attempt, which will
     deliver the message, leave it queued, or bounce it,
     as appropriate
 (c) exit 0, leaving the delivery attempting going

The problem that RMS mentions happens if you don't give any -odX
options: usually that means you'll get `foreground' delivery, which
typically means that the MTA will try one delivery attempt now.

This is even more unhelpful when combined with -oem (also sometimes
the default), which (AIUI[1]) exits 0 on success or if the first
delivery attempt fails but the message is queued, but exits nonzero if
the delivery failed straight away even if the message was successfully
bounced.

Emacs needs, from the MTA, the behaviour I specify above for
-odb -oee.  Ie, exit status 0 from sendmail should mean the same as
`250 OK' does after SMTP DATA final dot.

If it is difficult to get this behaviour portably (which seems
unlikely nowadays although may have been much harder in times past)
then I think it's still worth doing.  In any case any other behaviour
by the MTA will always result in at least one or more of these
symptoms:

 * Excessive delay when sending mail interactive.
 * Silently vanishing mail.  (`Mail sent' but not actually sent.)
 * Interactive report of a problem sending mail (`Mail could
   not be sent') followed _also_ by a bounce.
 * Interactive report of a problem sending mail (`Mail could
   not be sent') but in fact the mail is also later delivered.

Is there some way to configure Emacs to use -odb -oee ?  If so we
(FSF, or failing that, Debian) should change the default.

If not all MTAs support -odb -oee (or use it to mean the same thing)
then for Debian we should patch them, and probably FSF Emacs should
have a configuration option to work with broken MTAs (in this case
passing sendmail other options may be helpful).

I know that Exim does support -odb -oee (and last time I looked the
Exim docs are reasonably good about these questions).  Exim 3.35
(which I'm running here) has a bug where at least one of
stdin/stdout/stderr isn't properly closed by the asynchronous child,
which can cause things to hang if you run sendmail via ssh or userv,
but hopefully Emacs can be made to stop waiting when sendmail has
exited, even if one of the pipes to it hasn't been closed at the other
end.

Smail interprets -oee to mean the same as -oem, but with background
delivery you probably won't get too many false nonzero exits.

The copy of the Sendmail Installation and Operation Guide I have to
hand here is unhelpfully vague about the exact behaviour of the
various -oeX options.  (Search the document for the string
`ErrorMode'.)

Postfix seems to ignore -oeX and -odX completely.  I think it's
probably modern enough to do the right thing.

Ian.
(submitter of the Debian bug #114849, and long-time free software
developer and user)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]