all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* sendmail.el bug or expected behavior?
@ 2004-01-20  6:14 Rob Browning
  2004-01-20 11:53 ` Simon Josefsson
                   ` (2 more replies)
  0 siblings, 3 replies; 38+ messages in thread
From: Rob Browning @ 2004-01-20  6:14 UTC (permalink / raw)



Emacs doesn't always check for a non-zero exit status from sendmail,
which can lead to silent mail lossage.  For example:

 emacs21 -q
 [in the *scratch* buffer]
 (setq sendmail-program "/bin/false") C-j
 M-x vm-mail RET
 check that sendmail-program has right value with C-h v
 fill in a short test message
 C-c C-c
 emacs says `Sending...done'
 (no mail has been sent, of course)

Although from reading mail-interactive's description, I wasn't sure if
this behavior was a bug or intentional:

  mail-interactive's value is nil
  Documentation: *Non-nil means when sending a message wait for and
  display errors.  nil means let mailer mail back a message to report
  errors.

If this isn't just expected behavior, then someone suggested this as a
fix:

+++ emacs21-21.3+1/lisp/mail/sendmail.el
@@ -794,7 +794,7 @@
   (require 'mail-utils)
   (let ((errbuf (if mail-interactive
 		    (generate-new-buffer " sendmail errors")
-		  0))
+		  t))
 	(tembuf (generate-new-buffer " sendmail temp"))
 	(case-fold-search nil)
 	(coding (and (local-variable-p 'buffer-file-coding-system)
@@ -972,7 +972,7 @@
 		     (args 
 		      (append (list (point-min) (point-max)
 				    program
-				    nil errbuf nil "-oi")
+				    (not mail-interactive) errbuf nil "-oi")
 			      (and mail-specify-envelope-from
 				   (list "-f" (or mail-envelope-from
 						  user-mail-address)))

but I wasn't sure that this would be OK since it looks like it would
briefly insert, and then remove the sendmail error output from the
current buffer whenever mail-interactive is nil.

(Thanks to Ian Jackson for the example, and Matt Kraai for the
suggested fix.)

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2004-01-31 17:26 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-20  6:14 sendmail.el bug or expected behavior? Rob Browning
2004-01-20 11:53 ` Simon Josefsson
2004-01-21  9:21 ` Richard Stallman
2004-01-21 18:28   ` Kevin Rodgers
2004-01-21 22:33   ` Simon Josefsson
2004-01-22 19:00     ` Richard Stallman
2004-01-22 19:09       ` Simon Josefsson
2004-01-23 12:29         ` Ian Jackson
2004-01-23 15:13           ` Jan D.
2004-01-26 11:20             ` Ian Jackson
2004-01-26 13:28               ` Jan D.
2004-01-26 13:40                 ` Ian Jackson
2004-01-26 13:50                   ` Jan D.
2004-01-26 14:10                     ` Ian Jackson
2004-01-26 14:25                       ` Jan D.
2004-01-26 14:29                         ` Ian Jackson
2004-01-26 14:35                           ` Jan D.
2004-01-26 14:42                             ` Ian Jackson
2004-01-27 18:49                   ` Richard Stallman
2004-01-27 21:03                     ` Stefan Monnier
2004-01-29 17:52                       ` Richard Stallman
2004-01-25 14:46           ` Richard Stallman
2004-01-23 18:25         ` Richard Stallman
2004-01-23 18:33           ` Eli Zaretskii
2004-01-23 18:38           ` Simon Josefsson
2004-01-26 14:09             ` Ian Jackson
2004-01-26 16:21               ` Simon Josefsson
2004-01-26 18:22                 ` Stefan Monnier
2004-01-26 19:26                   ` Simon Josefsson
2004-01-26 20:47                     ` Stefan Monnier
2004-01-27 18:50                 ` Richard Stallman
2004-01-30  4:27 ` Rob Browning
2004-01-30 14:45   ` Stefan Monnier
2004-01-30 14:46   ` Stefan Monnier
2004-01-30 14:46     ` David Kastrup
2004-01-30 16:14       ` Stefan Monnier
2004-01-31  7:51   ` Richard Stallman
2004-01-31 17:26     ` Rob Browning

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.