From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.emacs.devel Subject: sendmail.el bug or expected behavior? Date: Tue, 20 Jan 2004 00:14:47 -0600 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <877jzn2lk8.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1074579521 29399 80.91.224.253 (20 Jan 2004 06:18:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 20 Jan 2004 06:18:41 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Jan 20 07:18:33 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AipDd-0000Zl-00 for ; Tue, 20 Jan 2004 07:18:33 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AipDd-0002WV-00 for ; Tue, 20 Jan 2004 07:18:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AipBE-0006u4-6l for emacs-devel@quimby.gnus.org; Tue, 20 Jan 2004 01:16:04 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AipAY-0006r3-9Q for emacs-devel@gnu.org; Tue, 20 Jan 2004 01:15:22 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AipA1-00067W-Lg for emacs-devel@gnu.org; Tue, 20 Jan 2004 01:15:20 -0500 Original-Received: from [66.93.216.237] (helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AipA1-00067T-72 for emacs-devel@gnu.org; Tue, 20 Jan 2004 01:14:49 -0500 Original-Received: from raven.i.defaultvalue.org (raven.i.defaultvalue.org [192.168.1.7]) by defaultvalue.org (Postfix) with ESMTP id 87BB64034 for ; Tue, 20 Jan 2004 00:14:48 -0600 (CST) Original-Received: by raven.i.defaultvalue.org (Postfix, from userid 1000) id E117C81109; Tue, 20 Jan 2004 00:14:47 -0600 (CST) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19318 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19318 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